From patchwork Tue Jun 29 18:54:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 468326 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5249346jao; Tue, 29 Jun 2021 12:23:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTfO3sVW40WlYzHcHik3jJUTKFMpWHjJwDg2q3YglJ56fX1xTW1PF0RSTnetkGLAkA6s3e X-Received: by 2002:a05:6102:a83:: with SMTP id n3mr26268071vsg.21.1624994590436; Tue, 29 Jun 2021 12:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624994590; cv=none; d=google.com; s=arc-20160816; b=V3ZggRN5JotF/q00un5KBRMKbH2lNR24rLoyowCNkaX64+p54+fmqF7oQqzZzi7fiR Lmjn1FqXyH7xEE1LyjFS6RgIVHarIRFzJEEiemErn9I00IQlUOdP7QRGkCjus5tcn2/0 xmjxys0q5dpS/ji+1NsXNk5v6pcCuu4fQV5kqtjeUcGVjXSJOJs6RaTe1kK7AblRF0L7 EWHAHJ0XyooPDtZuNVgmT0RVzLOZEhRTCh6x1wJQFAhQ2MdMQuSdrQME7HDubI/A4A1S nW6zWxrTqubn09JnqzKJE0vUY2IRK/GCPalTnQE5pwNfVCchgh1A5yobTo1wRmtEEUhq gxDw== 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=XHdB1I8aK6ZOFpKMHs281yG5ahJFgJAsOdRjioJDUOI=; b=PmXrP4y3He3mXOdmv3yO627Ru3fpGJSbH4chkz3e5QVqgUif3M86K3RDJsx77LZn36 p4ReBsqHoqRgrJ3aQYny+fPVVLlOCS0+N25L3YI93m3EZMwxcBjQokSup2Qe6w0KsXmn fHbxCtMC+EfY1RM3SdMnwmJnHVVtH9HGflkOBXzwKj+/ojUs+qMOEDV2AdfwWNH3p++C HSkvAWEqs7uzCQtqcjpHHsx2s+1ZGNSJu28Cd7ND06S6IwibQCM5E8kJ4pl39ZTLVRuQ a3TRfwQ95p36ZdtXhP9HiiEOX6g6bpnzwdvPLMCAm1lcN/UOXu5Kf+vYxXRZ18RIPk8P sX4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mduk+61y; 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=pass (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 g14si4816190vsf.21.2021.06.29.12.23.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Jun 2021 12:23:10 -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=pass header.i=@linaro.org header.s=google header.b=mduk+61y; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyJK9-0001GG-Pd for patch@linaro.org; Tue, 29 Jun 2021 15:23:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyItR-0008WJ-Bp for qemu-devel@nongnu.org; Tue, 29 Jun 2021 14:55:33 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:39847) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyItA-0000tA-5J for qemu-devel@nongnu.org; Tue, 29 Jun 2021 14:55:33 -0400 Received: by mail-pl1-x629.google.com with SMTP id d1so33179plg.6 for ; Tue, 29 Jun 2021 11:55:06 -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=XHdB1I8aK6ZOFpKMHs281yG5ahJFgJAsOdRjioJDUOI=; b=mduk+61ykcVZeK4Er7w5axnTJO5lVejLQpBHQcJ8b5iK/cCq15K/G3w2RdVvRVi3oM qPi2vDowSKJmRlYcx7Tzrrh3e06VFw6A3sTktBzxk0ne7MqBwDAKbEAFo92Up7BweTAc yxY5WXTyxMCrt9GoXktnrcddMf74QCPzwYIgn+dqD0vJDcrzRc+xAc0JGlC7gu1RPD8H rx0p71+b1v/5XZxNRd3kUwyOqTW4fNLY9QlK0cMDitY+DtZi7cFEuCfOrvapMda9Ickm W/IzDVFWBBWMxUXtybzaBDohfOuIB+KEbO4rqj0lmMg2PfnsiMF4oDqRnAP6bwEaSXo3 tsPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XHdB1I8aK6ZOFpKMHs281yG5ahJFgJAsOdRjioJDUOI=; b=j5SV6SV8l9l196IZhTG5RC7DSPfdpH/KrArvK9s47KLcq9r+z8HvL+Huybn6xVyluI G2ObnWIii6YPJvfzvo5G2MMDihiP9BL4iWIByXTh7AFGEfAiO0YKtb6D9mDWX2MPKo4R e+Sx5FI4u6wGOFBecKGOmFufuiKxDW0syzVvSFN+u0Y63wnHsGoSoJJl+fUNuse3KLdE XqLUEN7meQsaGSBDrjWI+5rUHzPfdgK4CWdZ2Q/9gvYuFgTrNqoAkqHMEjCwdY2y9J/C KQcqp6c41tJHYPSGBWzAKLf9bdmgaabVureMIS4kRaITvnHZqmXx9LtMsfIkOy7u6bVW pQvw== X-Gm-Message-State: AOAM530NiTGjIQ3j/5dxxeUDXOsdBbIOIwZV9BOkVGm1VXXfprLiCV+v 4vqcj7DYyYC40+/+c9/17JRcTfQuVXmUcA== X-Received: by 2002:a17:902:ecc6:b029:128:ed8c:a025 with SMTP id a6-20020a170902ecc6b0290128ed8ca025mr7658086plh.64.1624992905174; Tue, 29 Jun 2021 11:55:05 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id j2sm18811253pfb.53.2021.06.29.11.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 11:55:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 16/63] target/cris: Mark exceptions as DISAS_NORETURN Date: Tue, 29 Jun 2021 11:54:08 -0700 Message-Id: <20210629185455.3131172-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210629185455.3131172-1-richard.henderson@linaro.org> References: <20210629185455.3131172-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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 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: , Cc: "Edgar E . Iglesias" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" After we've raised the exception, we have left the TB. Reviewed-by: Edgar E. Iglesias Tested-by: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/cris/translate.c | 5 +++-- target/cris/translate_v10.c.inc | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/target/cris/translate.c b/target/cris/translate.c index e086ff9131..24dbae6d58 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -2873,6 +2873,7 @@ static int dec_rfe_etc(CPUCRISState *env, DisasContext *dc) -offsetof(CRISCPU, env) + offsetof(CPUState, halted)); tcg_gen_movi_tl(env_pc, dc->pc + 2); t_gen_raise_exception(EXCP_HLT); + dc->base.is_jmp = DISAS_NORETURN; return 2; } @@ -2900,7 +2901,7 @@ static int dec_rfe_etc(CPUCRISState *env, DisasContext *dc) /* Breaks start at 16 in the exception vector. */ t_gen_movi_env_TN(trap_vector, dc->op1 + 16); t_gen_raise_exception(EXCP_BREAK); - dc->base.is_jmp = DISAS_UPDATE; + dc->base.is_jmp = DISAS_NORETURN; break; default: printf("op2=%x\n", dc->op2); @@ -3188,7 +3189,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns) cris_evaluate_flags(dc); tcg_gen_movi_tl(env_pc, dc->pc); t_gen_raise_exception(EXCP_DEBUG); - dc->base.is_jmp = DISAS_UPDATE; + dc->base.is_jmp = DISAS_NORETURN; /* The address covered by the breakpoint must be included in [tb->pc, tb->pc + tb->size) in order to for it to be properly cleared -- thus we increment the PC here so that diff --git a/target/cris/translate_v10.c.inc b/target/cris/translate_v10.c.inc index dd44a7eb97..0ba2aca96f 100644 --- a/target/cris/translate_v10.c.inc +++ b/target/cris/translate_v10.c.inc @@ -61,6 +61,7 @@ static inline void cris_illegal_insn(DisasContext *dc) { qemu_log_mask(LOG_GUEST_ERROR, "illegal insn at pc=%x\n", dc->pc); t_gen_raise_exception(EXCP_BREAK); + dc->base.is_jmp = DISAS_NORETURN; } static void gen_store_v10_conditional(DisasContext *dc, TCGv addr, TCGv val, @@ -1169,7 +1170,7 @@ static unsigned int dec10_ind(CPUCRISState *env, DisasContext *dc) t_gen_mov_env_TN(trap_vector, c); tcg_temp_free(c); t_gen_raise_exception(EXCP_BREAK); - dc->base.is_jmp = DISAS_UPDATE; + dc->base.is_jmp = DISAS_NORETURN; return insn_len; } LOG_DIS("%d: jump.%d %d r%d r%d\n", __LINE__, size,