From nobody Wed Dec 17 21:45:44 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1603210072; cv=none; d=zohomail.com; s=zohoarc; b=d17faI32gqxpvhq3vmHeAB0UNWKcAhv+j03FzxjKxpmSR1EaBqU9+srC1DrOCssIwTBDTXt/vfOsGMQwxD31wCejiAmWTtvKKmbiPIzhqxCFoN4Dl4h4Meqkovb1psM13+4UNO+3q4hz+tbdDWYHN//8Jnoo372RjapeZ3UXSkk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603210072; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1TAKmnrXBfL6eR3DBczCUzOiCIS8y/1ety/iZUsCGWo=; b=DVo990sRX/yc3wiZ4nqSdxNnarQqjlNUqiGHMALw65MAgVRekyR7g64M1yV9RSq5koDskBX3hp2vnE4QyMn4kqgIyOgfk8UrLLmGA48H7tAuBt7a+z7SH0aTOUkBvsnc1d1Xf19d3MJOIPpmUIwjE4oySXKZQjiu/+8ZDLPq5a8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603210072035636.6182816806062; Tue, 20 Oct 2020 09:07:52 -0700 (PDT) Received: from localhost ([::1]:60508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUuAw-0000zw-Tx for importer@patchew.org; Tue, 20 Oct 2020 12:07:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUu15-0005Hm-O1 for qemu-devel@nongnu.org; Tue, 20 Oct 2020 11:57:39 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:35868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUu14-0003w6-1I for qemu-devel@nongnu.org; Tue, 20 Oct 2020 11:57:39 -0400 Received: by mail-wm1-x329.google.com with SMTP id e2so2519114wme.1 for ; Tue, 20 Oct 2020 08:57:37 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id v6sm3780205wrp.69.2020.10.20.08.57.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 08:57:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=1TAKmnrXBfL6eR3DBczCUzOiCIS8y/1ety/iZUsCGWo=; b=zyunfGmtNVncBEf5Ay26fz6kmDe8+2y54N+7Te8xyjAEL/4mySA6rfhOaeouHKj96h TQnT5SLhxbfNDkEqooV/RGvMUGOoR5ND6Wwc39kqW54z1vDtpkIv1+tGJ1FxeYuH+zNO sX2fH6LD6We2gIIbp54wcHrMiSJ6Auc3p4fWhsVei1Pjq9k6FFFssDLGCVUbwLKBxQGe L3sak0MaU68dS+Ye3Y0St+grK20/Q0KC5TS2/3WtRX++Yjkfag6tS81s06fDRRbtXqOM Xv9p7OAWzp2SKnLyFxZoFbUj/ZsMT0tEiMZgFMZ2DczO7KDgp1kvdEKZCfEzHE70cLpT 1D/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1TAKmnrXBfL6eR3DBczCUzOiCIS8y/1ety/iZUsCGWo=; b=M22bPef0idxIKqdT7WWx28VVL2nCdUYhPcuXIW45/igdi/evX0HwdWebaNGNiD9Rr7 7U1vtg/imNc8ED2SkExQ3GC50u3FdTD4P+61GeNgnp9wEbNArMjwnLhyZgeVJu/PFM7g WF3jHbaH7IA02ck+slEFz8MfN+44rT0L03tkeT3QN+ej5Y8jS0oyKJvXiJoKRUWTGQ+k mftiuHqeCJ87IB3ytS8NGeac8yBKul8Kk8oYgcbtfNywq+wKAum9x6IxAjK828LHMDOF zPYmIRqIMLCMGlqkebt6w5jvyIqgUoyQcv52PHig8zZRiPCewM8eYTOiEanxxV+Mglqu UMuQ== X-Gm-Message-State: AOAM533sPXsZDR0k6lP45/xcmusdQLA3mphORMElcvfPLRAVXZC/3c3m Fa7NWZ+a9ukr+VUy0okbqWiCCOWyzeOSfQ== X-Google-Smtp-Source: ABdhPJxDYBb9c5svNh/4mW31Tb8OxvkbB05ZzqVYUrOSGXyDRFD6f8XcA0BxLGnzUiFNIzxeZoO/9Q== X-Received: by 2002:a1c:e403:: with SMTP id b3mr2884543wmh.79.1603209456318; Tue, 20 Oct 2020 08:57:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 24/41] target/arm: Don't allow BLX imm for M-profile Date: Tue, 20 Oct 2020 16:56:39 +0100 Message-Id: <20201020155656.8045-25-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201020155656.8045-1-peter.maydell@linaro.org> References: <20201020155656.8045-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" The BLX immediate insn in the Thumb encoding always performs a switch from Thumb to Arm state. This would be totally useless in M-profile which has no Arm decoder, and so the instruction does not exist at all there. Make the encoding UNDEF for M-profile. (This part of the encoding space is used for the branch-future and low-overhead-loop insns in v8.1M.) Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20201019151301.2046-6-peter.maydell@linaro.org --- target/arm/translate.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/arm/translate.c b/target/arm/translate.c index 9f2201ca577..dc3a4031db7 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -7918,6 +7918,14 @@ static bool trans_BLX_i(DisasContext *s, arg_BLX_i *= a) { TCGv_i32 tmp; =20 + /* + * BLX would be useless on M-profile; the encoding space + * is used for other insns from v8.1M onward, and UNDEFs before that. + */ + if (arm_dc_feature(s, ARM_FEATURE_M)) { + return false; + } + /* For A32, ARM_FEATURE_V5 is checked near the start of the uncond blo= ck. */ if (s->thumb && (a->imm & 2)) { return false; --=20 2.20.1