From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NgjFw-00086z-Qr for qemu-devel@nongnu.org; Sun, 14 Feb 2010 13:31:44 -0500 Received: from [199.232.76.173] (port=43612 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgjFw-00086k-5a for qemu-devel@nongnu.org; Sun, 14 Feb 2010 13:31:44 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NgjFu-0008WP-AL for qemu-devel@nongnu.org; Sun, 14 Feb 2010 13:31:44 -0500 Received: from mail-yx0-f199.google.com ([209.85.210.199]:48419) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NgjFu-0008Vd-36 for qemu-devel@nongnu.org; Sun, 14 Feb 2010 13:31:42 -0500 Received: by mail-yx0-f199.google.com with SMTP id 37so3652604yxe.27 for ; Sun, 14 Feb 2010 10:31:41 -0800 (PST) Sender: Rabin Vincent From: Rabin Vincent Date: Mon, 15 Feb 2010 00:02:34 +0530 Message-Id: <1266172357-9252-2-git-send-email-rabin@rab.in> In-Reply-To: <1266172357-9252-1-git-send-email-rabin@rab.in> References: <1266172357-9252-1-git-send-email-rabin@rab.in> Subject: [Qemu-devel] [PATCH 1/3] target-arm: fix thumb CPS List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Rabin Vincent The Thumb CPS currently does not work correctly: CPSID touches more bits than the instruction wants to, and CPSIE does nothing. Fix it by passing the correct mask (the "affect" bits) and value. Signed-off-by: Rabin Vincent --- target-arm/translate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 786c329..10a516b 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -8898,7 +8898,7 @@ static void disas_thumb_insn(CPUState *env, DisasContext *s) shift = CPSR_A | CPSR_I | CPSR_F; else shift = 0; - gen_set_psr_im(s, shift, 0, ((insn & 7) << 6) & shift); + gen_set_psr_im(s, ((insn & 7) << 6), 0, shift); } break; -- 1.6.6