From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSfku-0004Fp-6I for qemu-devel@nongnu.org; Wed, 06 Jan 2010 18:57:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSfkp-0004D7-Ga for qemu-devel@nongnu.org; Wed, 06 Jan 2010 18:57:35 -0500 Received: from [199.232.76.173] (port=47116 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSfkp-0004Cv-Ca for qemu-devel@nongnu.org; Wed, 06 Jan 2010 18:57:31 -0500 Received: from mail-bw0-f212.google.com ([209.85.218.212]:42048) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSfko-0007bR-Vh for qemu-devel@nongnu.org; Wed, 06 Jan 2010 18:57:31 -0500 Received: by bwz4 with SMTP id 4so11252788bwz.2 for ; Wed, 06 Jan 2010 15:57:29 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <20100105231558.6526.44483.stgit@skyserv> <20100105231933.6526.79032.stgit@skyserv> Date: Thu, 7 Jan 2010 02:57:28 +0300 Message-ID: Subject: Re: [Qemu-devel] [PATCH 6/9] sparc64: clear exception_index with -1 value From: Igor Kovalenko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: Blue Swirl , qemu-devel@nongnu.org On Thu, Jan 7, 2010 at 2:29 AM, Artyom Tarasenko wrote: > What's the effect of the patch? Don't we need it for sparc32 too? The > code looks similar. > > 2010/1/6 Blue Swirl : >> Thanks, applied. >> >> On Tue, Jan 5, 2010 at 11:19 PM, Igor V. Kovalenko >> wrote: >>> From: Igor V. Kovalenko >>> >>> Signed-off-by: Igor V. Kovalenko >>> --- >>> =A0target-sparc/op_helper.c | =A0 =A02 +- >>> =A01 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c >>> index b1978cb..94f1c7a 100644 >>> --- a/target-sparc/op_helper.c >>> +++ b/target-sparc/op_helper.c >>> @@ -3535,7 +3535,7 @@ void do_interrupt(CPUState *env) >>> =A0 =A0 env->tbr |=3D ((env->tl > 1) ? 1 << 14 : 0) | (intno << 5); >>> =A0 =A0 env->pc =3D env->tbr; >>> =A0 =A0 env->npc =3D env->pc + 4; >>> - =A0 =A0env->exception_index =3D 0; >>> + =A0 =A0env->exception_index =3D -1; >>> =A0} >>> =A0#else >>> =A0#ifdef DEBUG_PCALL Right, but that's out of scope for this changeset. In fact sparc32 should have the same issue, as well as alpha, s390 and sh4. Check in cpu_exec() for valid exception_index is "greater or equal to zero" so all those targets should be corrected. On sh4 we even check for "invalid value of exception_index is -1" --=20 Kind regards, Igor V. Kovalenko