From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id d42sm20376491wrd.37.2017.03.20.03.47.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Mar 2017 03:47:47 -0700 (PDT) Received: from zen (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTPS id 3E4903E018C; Mon, 20 Mar 2017 10:48:12 +0000 (GMT) References: <1487616072-9226-1-git-send-email-peter.maydell@linaro.org> <1487616072-9226-2-git-send-email-peter.maydell@linaro.org> User-agent: mu4e 0.9.19; emacs 25.2.10 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Peter Maydell Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org, Michael Davidsaver Subject: Re: [PATCH 1/4] arm: HVC and SMC encodings don't exist for M profile In-reply-to: <1487616072-9226-2-git-send-email-peter.maydell@linaro.org> Date: Mon, 20 Mar 2017 10:48:12 +0000 Message-ID: <87r31sns0j.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-TUID: wsB7xxYq69H8 Peter Maydell writes: > M profile doesn't have the HVC or SMC encodings, so make them always > UNDEF rather than generating calls to helper functions that assume > A/R profile. > > Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée > --- > target/arm/translate.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target/arm/translate.c b/target/arm/translate.c > index 9fded03..895b399 100644 > --- a/target/arm/translate.c > +++ b/target/arm/translate.c > @@ -10365,6 +10365,9 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw > goto illegal_op; > > if (insn & (1 << 26)) { > + if (arm_dc_feature(s, ARM_FEATURE_M)) { > + goto illegal_op; > + } > if (!(insn & (1 << 20))) { > /* Hypervisor call (v7) */ > int imm16 = extract32(insn, 16, 4) << 12 -- Alex Bennée From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cpuqw-0001kK-It for qemu-devel@nongnu.org; Mon, 20 Mar 2017 06:47:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cpuqr-000862-O4 for qemu-devel@nongnu.org; Mon, 20 Mar 2017 06:47:54 -0400 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:36599) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cpuqr-00085o-Gw for qemu-devel@nongnu.org; Mon, 20 Mar 2017 06:47:49 -0400 Received: by mail-wm0-x236.google.com with SMTP id n11so59879703wma.1 for ; Mon, 20 Mar 2017 03:47:49 -0700 (PDT) References: <1487616072-9226-1-git-send-email-peter.maydell@linaro.org> <1487616072-9226-2-git-send-email-peter.maydell@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1487616072-9226-2-git-send-email-peter.maydell@linaro.org> Date: Mon, 20 Mar 2017 10:48:12 +0000 Message-ID: <87r31sns0j.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 1/4] arm: HVC and SMC encodings don't exist for M profile List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, patches@linaro.org, Michael Davidsaver Peter Maydell writes: > M profile doesn't have the HVC or SMC encodings, so make them always > UNDEF rather than generating calls to helper functions that assume > A/R profile. > > Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée > --- > target/arm/translate.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target/arm/translate.c b/target/arm/translate.c > index 9fded03..895b399 100644 > --- a/target/arm/translate.c > +++ b/target/arm/translate.c > @@ -10365,6 +10365,9 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw > goto illegal_op; > > if (insn & (1 << 26)) { > + if (arm_dc_feature(s, ARM_FEATURE_M)) { > + goto illegal_op; > + } > if (!(insn & (1 << 20))) { > /* Hypervisor call (v7) */ > int imm16 = extract32(insn, 16, 4) << 12 -- Alex Bennée