Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O5LRf-0001UY-D0 for qemu-devel@nongnu.org; Fri, 23 Apr 2010 12:09:35 -0400 Received: from [140.186.70.92] (port=45306 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O5LRd-0001Ty-O4 for qemu-devel@nongnu.org; Fri, 23 Apr 2010 12:09:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O5LRc-0003U7-3z for qemu-devel@nongnu.org; Fri, 23 Apr 2010 12:09:33 -0400 Received: from smtp21.orange.fr ([80.12.242.46]:58898) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5LRb-0003Tx-Vi for qemu-devel@nongnu.org; Fri, 23 Apr 2010 12:09:32 -0400 From: Thomas Monjalon Date: Fri, 23 Apr 2010 18:09:31 +0200 Message-Id: <1272038971-7088-1-git-send-email-thomas_ml@monjalon.net> Subject: [Qemu-devel] [PATCH] [RFC] target-ppc: fix RFI by clearing TGPR and ILE List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl From: Thomas Monjalon Since commit 2ada0ed, the PPC processors which have TGPR support should be broken because the bit TGPR was not cleared. After testing with e300, it seems that ILE should be cleared also. Feedbacks welcomed, thanks. Signed-off-by: Thomas Monjalon --- target-ppc/op_helper.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 8f2ee98..22d7530 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -1645,8 +1645,10 @@ static inline void do_rfi(target_ulong nip, target_ulong msr, void helper_rfi (void) { - do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1], - ~((target_ulong)0x0), 1); + target_ulong msrm = 1 << MSR_ILE; + if (env->flags & POWERPC_FLAG_TGPR) + msrm |= 1 << MSR_TGPR; + do_rfi(env->spr[SPR_SRR0], env->spr[SPR_SRR1], ~((target_ulong)msrm), 1); } #if defined(TARGET_PPC64) -- 1.7.0.6