From patchwork Sat Apr 30 13:29:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 568136 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp7228798map; Sat, 30 Apr 2022 07:06:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfn81H5/jDEbYrX39skPL5HWYGk+2m21cW4jqqMe0oDA6rocRv+dqvfzJKXQVHWwbTmbFf X-Received: by 2002:a37:b95:0:b0:69f:b96d:ff4e with SMTP id 143-20020a370b95000000b0069fb96dff4emr2842099qkl.373.1651327607758; Sat, 30 Apr 2022 07:06:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651327607; cv=none; d=google.com; s=arc-20160816; b=TwnUyMlKhLDh9WCCP1pg42daEajgTWysUNj9nBp4pmVQ3NsC0se6bimHW2UBr5GugA jVKo9KFgd5iiOhj6xLl5H2QowzcG7ymbsZ9NkoIF6zNVCfmUIxFofzycdFUEQsVof3j4 b3KiQTsSVasJfVaZDuf+sAveAWIOA62/I56C3FDmE+xUrH0ESEZDCLDQgpp4mylcPYd9 nGsdx+VZQH1SyN7mPbBp26yJ8PsLSx7AZNxZ9jtkQtTjwppsupkSEOccfNeookNow+bZ Tt7jueQGHpyLB1rGmKVQ6QSyk/KObh2fNu+01z+IKdKb0SUzOYWZn0LwGA97H7j0Z5mB MVtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=/27qRMF/7/SVCIffe/0N75Mp/N/kT0yltHM3qggU1zM=; b=zgr+qY6SsDy7/UbNKLW5Py/w2gCS40vmsSSY3MCnhXcQna5bwlxTW+I4jzvG/lhcY3 D3LGXmozeGP9sGXbweFYwhUTaWwQ/bvLDtWnVuw0mWZw0C1VVjJ+fsVqpyAj6D5nLt/6 vl7uLT/BINuH/26BFQb37SghfsArySnUfkXVVrJ0Uj9aeshmJbjFoFV/uTwY84wPCROb 7RCWQ/5A/QFQXPdmixcTeqZmf+6yFgKJqoVqls/7KquGEJNYY86dzwa/FF33rQRZSwRE PX9e+2hQd4W0QNmFBCtl1crWLaN8r+Riov2teZPa4Qjx1i99H6R55smLZucXQXaZWUe7 lgGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="yQ/fel4m"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g13-20020a0562140acd00b004563337c5absi4270479qvi.196.2022.04.30.07.06.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Apr 2022 07:06:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="yQ/fel4m"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nknkF-0006KX-BU for patch@linaro.org; Sat, 30 Apr 2022 10:06:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nknAr-00055A-Vb for qemu-devel@nongnu.org; Sat, 30 Apr 2022 09:30:15 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:52892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nknAq-0006XJ-He for qemu-devel@nongnu.org; Sat, 30 Apr 2022 09:30:13 -0400 Received: by mail-pj1-x102f.google.com with SMTP id e24so9298872pjt.2 for ; Sat, 30 Apr 2022 06:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/27qRMF/7/SVCIffe/0N75Mp/N/kT0yltHM3qggU1zM=; b=yQ/fel4m6s85ma0A3x/cRZwAJELQoIY1IJmGo7Ibtr1JyESfIxFHOmKYOjUFtRM7fj B1OsfgSVLloxJ73FrUkQfJ/oNzwY1DYtTNmxiAxVP6fzwiVVxMS0/N9bsMhaWAOHZg5N rx3HT8KNqAyMX6qqpDN28bdsnhOh8GBd6qYq1o/4VcOGXdN+zy0wk4+yqDPZ0LsS5pcs reRwtPmYXoMnR6TabcD4YfQmrF97d4INqvcw7eQZdrWxOnfUZA/SrmUoQV0iJp+aQ5k8 fvvUnL5n7kD1IoJdnGsPqxWM7oEZcI9l2EpFiM3qIpYlSdgvotIYQXTeT9JHd2foxBsx 23SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/27qRMF/7/SVCIffe/0N75Mp/N/kT0yltHM3qggU1zM=; b=6GC7aA1LKs/AX+1sHk5vcF2TSFeNK5Lwx/u5tDrxbVPtwYmfjYFXJszgY1zSn+3+jx OB6nhZIrBLnjZm/Tckd51upnq2my5K4mcbWXt9etz86QTS5dmHDcx5vx+inST7ISUJ06 o7pJK3HLNnypEcOHrZ5PFP/TU8RpFZ2tLitT3ALTWv7kK2iDgaiTOhpiGNSGsqdBs0P+ Nl86wde8XBWJzPMBvJjmctnj/jBSKRKpMRSz1M6bifKtsIkyx9vKs9Yjgji5J7AMER/z IDV25iYMlF5WSviIJ/rF7HTzQHW7Byzt9AMS2gWs48fZXSei1cwBxbF844qx6WXYqB0W cqhA== X-Gm-Message-State: AOAM531NHPUPd3xZetXz12E1JM7Gb99CzhAw7Bn7yg6zCja0Q7YJmIRf wEavJkcbrvrojiwPrq9cCqc3lXnaRSqKzw== X-Received: by 2002:a17:902:8644:b0:15a:3b4a:538a with SMTP id y4-20020a170902864400b0015a3b4a538amr3729895plt.146.1651325411272; Sat, 30 Apr 2022 06:30:11 -0700 (PDT) Received: from stoup.. ([71.212.142.129]) by smtp.gmail.com with ESMTPSA id x5-20020aa793a5000000b0050dc7628201sm1522606pff.219.2022.04.30.06.30.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 06:30:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 38/43] target/m68k: Enable semihosting for non-coldfire Date: Sat, 30 Apr 2022 06:29:27 -0700 Message-Id: <20220430132932.324018-39-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220430132932.324018-1-richard.henderson@linaro.org> References: <20220430132932.324018-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102f.google.com 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: crwulff@gmail.com, alex.bennee@linaro.org, f4bug@amsat.org, laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The libgloss m68k-semi.txt spec says that bkpt #0 may be used when the halt insn is not available. While halt is available for 68060, continue to support bkpt #0 for all m68k processors. Signed-off-by: Richard Henderson --- target/m68k/translate.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index b7adc8f53d..51c546f26f 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -2775,6 +2775,15 @@ DISAS_INSN(swap) DISAS_INSN(bkpt) { +#ifndef CONFIG_USER_ONLY + /* The non-ColdFire semihosting insn is bkpt #0. */ + if (!m68k_feature(s->env, M68K_FEATURE_CF_ISA_A) + && !IS_USER(s) + && (insn & 7) == 0 + && maybe_semihosting(s)) { + return; + } +#endif gen_exception(s, s->base.pc_next, EXCP_DEBUG); }