From patchwork Fri Feb 15 14:18:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 14922 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 68D9923FC2 for ; Fri, 15 Feb 2013 14:18:46 +0000 (UTC) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by fiordland.canonical.com (Postfix) with ESMTP id 219A6A1841D for ; Fri, 15 Feb 2013 14:18:46 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id fy7so2181798vcb.4 for ; Fri, 15 Feb 2013 06:18:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=u6BQrsKBvBbsmoPCg/MfI2c6PfDb62Et9HYRa9uKlwM=; b=IEtpcBNrHM6FN8ziMBAVgnT+1KZ8gv1HwrXFci9tZPutWVX1BdyfI7bfZfwSJynrih WZZLi0j0vcD4Aa733AemW6EbQqV5I8ckNowwbS6ncle5UHCq67niYtcrjU9SzDgAQl3i s/NYfhucci974oWz946uwzx6Rvio9ORY7U9TqtW++eTYplEVD/DggW2cFhjLELzOiBTT T1mLx2eBTB8CXguGN2CkmxSKCXuiG4zUJj2q9kescSQZKyk6AgP9d5bZMTi16lsGYAtA WiSzDvNQgbqCKf0Ba91OXm9TisGVfevaVVQqGlEQPmslfOKv2EZpFtNRVoptsw52U+cj 4k2g== X-Received: by 10.52.175.66 with SMTP id by2mr3004498vdc.53.1360937923263; Fri, 15 Feb 2013 06:18:43 -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.221.4.5 with SMTP id oa5csp15579vcb; Fri, 15 Feb 2013 06:18:42 -0800 (PST) X-Received: by 10.204.11.212 with SMTP id u20mr879807bku.55.1360937920326; Fri, 15 Feb 2013 06:18:40 -0800 (PST) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id d42si17309765eep.172.2013.02.15.06.18.39 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 15 Feb 2013 06:18:39 -0800 (PST) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1U6M7a-0003S7-Ds; Fri, 15 Feb 2013 14:18:38 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH 2/2] target-arm: Don't decode RFE or SRS on M profile cores Date: Fri, 15 Feb 2013 14:18:38 +0000 Message-Id: <1360937918-13244-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1360937918-13244-1-git-send-email-peter.maydell@linaro.org> References: <1360937918-13244-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQn9LUuITDfetCjxmP6Gd2pTOHb5Ccs5Q6kTHdCOtP/RpT/7ZGq1g4IGYfB0Ackew4r8Y4kN M profile cores do not have the RFE or SRS instructions, so correctly UNDEF these insn patterns on those cores. Signed-off-by: Peter Maydell --- target-arm/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 62a4c15..9746869 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -8135,9 +8135,10 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw } else { /* Load/store multiple, RFE, SRS. */ if (((insn >> 23) & 1) == ((insn >> 24) & 1)) { - /* Not available in user mode. */ - if (IS_USER(s)) + /* RFE, SRS: not available in user mode or on M profile */ + if (IS_USER(s) || IS_M(env)) { goto illegal_op; + } if (insn & (1 << 20)) { /* rfe */ addr = load_reg(s, rn);