From patchwork Mon Jan 9 22:26:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 6131 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id BC0C623E13 for ; Mon, 9 Jan 2012 22:26:39 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id AD250A184AC for ; Mon, 9 Jan 2012 22:26:39 +0000 (UTC) Received: by eaac11 with SMTP id c11so3047370eaa.11 for ; Mon, 09 Jan 2012 14:26:39 -0800 (PST) Received: by 10.205.126.137 with SMTP id gw9mr7716421bkc.135.1326147999452; Mon, 09 Jan 2012 14:26:39 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs67317bkc; Mon, 9 Jan 2012 14:26:39 -0800 (PST) Received: by 10.180.91.42 with SMTP id cb10mr7969847wib.15.1326147998129; Mon, 09 Jan 2012 14:26:38 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id k66si7713612weq.23.2012.01.09.14.26.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 09 Jan 2012 14:26:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RkNfn-0000fk-Q5; Mon, 09 Jan 2012 22:26:35 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH] target-arm: Fix errors in decode of M profile CPS Date: Mon, 9 Jan 2012 22:26:35 +0000 Message-Id: <1326147995-2561-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 Fix errors in the decode of M profile CPS: * the decode of the I (affects PRIMASK) and F (affects FAULTMASK) bits was reversed * the FAULTMASK system register number is 19, not 17 This fixes an issue reported as LP:913925. Signed-off-by: Peter Maydell --- Note that we fixed the misnumbering of FAULTMASK on the msr helper side in commit 8284582. target-arm/translate.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index f91553a..280bfca 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -9710,15 +9710,15 @@ static void disas_thumb_insn(CPUState *env, DisasContext *s) break; if (IS_M(env)) { tmp = tcg_const_i32((insn & (1 << 4)) != 0); - /* PRIMASK */ + /* FAULTMASK */ if (insn & 1) { - addr = tcg_const_i32(16); + addr = tcg_const_i32(19); gen_helper_v7m_msr(cpu_env, addr, tmp); tcg_temp_free_i32(addr); } - /* FAULTMASK */ + /* PRIMASK */ if (insn & 2) { - addr = tcg_const_i32(17); + addr = tcg_const_i32(16); gen_helper_v7m_msr(cpu_env, addr, tmp); tcg_temp_free_i32(addr); }