From nobody Wed Feb 11 00:59:21 2026 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=1598625065; cv=none; d=zohomail.com; s=zohoarc; b=Hsoh/nlQHbwmpcflnYK6wZT2OYweNj9epmirJtzG9mFcx1pW8UCPbutsNaUYQ2Dh+/Xj74gPfmHXt9yZT6Ts9jvteaDQIjM9aNPAQibJG1FJ1U1tYNK0vJAPe28CGUKFG6diBMKrj0VggA5N/mUTz88xiTMzRqeFpIzc0R2qe2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598625065; h=Content-Transfer-Encoding:Cc: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=qXpLGSkTUh0l6cihbLBx2yxjRuaY4I2Cb0zQBnRmSlQ=; b=LHu76pPOyvcHXvkSD0Wfqh3cFHbfrLT1p5QciJ2XDViecEI1WMeZpWz7vhoHJwT+zdDUQbD2g2mLUSEkkX9mEvkhQhEelGhQIbFsO9cEtGlOsQ0LRcgtStLI1n/eBg9ql6Lw2jIL7ubbBvXp+OlBNDvSGLnLTwf9ARGHi2NhpbA= 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 159862506587430.661878137515714; Fri, 28 Aug 2020 07:31:05 -0700 (PDT) Received: from localhost ([::1]:45848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBfPE-00052G-Te for importer@patchew.org; Fri, 28 Aug 2020 10:31:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBfEg-0000g3-5g for qemu-devel@nongnu.org; Fri, 28 Aug 2020 10:20:10 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:46879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBfEd-00057Q-C1 for qemu-devel@nongnu.org; Fri, 28 Aug 2020 10:20:09 -0400 Received: by mail-pf1-x444.google.com with SMTP id t185so722716pfd.13 for ; Fri, 28 Aug 2020 07:20:06 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id j3sm1403080pjw.23.2020.08.28.07.20.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 07:20:04 -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=qXpLGSkTUh0l6cihbLBx2yxjRuaY4I2Cb0zQBnRmSlQ=; b=KakpYYKHmGmteDL+lHFlX6zCH1S5uw1naqWSrBkmncYx9YNjZUHkJf0O6F0NaqGtq/ qpINusx8ffqduxH6T4W5/KPQVrbsDB+k42r7KEIb5zG1sRzVMsegundBYK/NpOacHdru aZVQCi1FgAK5iY45pHAIJ8tzQBNt9y1k+DDa02Pwthxj0fwT715/n8wwIJunw/onVk6F ChgwfUvNu3ZuNSWd/iIHueCF8rO5Lz3hhwmd1nWRJo7vIf4Gokg4eK7IK1BWpPnW1WeZ ZrtXKLBcF1TMKueGv/Tfprg3eWrD4yGaT3S2bhyGcEapITfAr5JeNsLBy3lO9c9urpeA Lxbg== 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=qXpLGSkTUh0l6cihbLBx2yxjRuaY4I2Cb0zQBnRmSlQ=; b=d4UAu8LphhwpAVgD8MFJq1uw9B0fVSoFQ8IkIMRhE8Smdw5H/QuRgJUPRnA1jBlZAM ImjgDuZvfrNXfrsp36HFUXBL5oxo2gH6CwIVx6Eg7p1Csf0qluHapGruYwH8Q35XNRyA /ecTUp0GJctUzeCgnKs5kcP0WPYqlxQlHRhMM/sTB0ekZ57OsCyhHFvU5408FKaaAG02 oLS9VTmieGh7KKz3jxkK1zEcRwBbNW2uT2Utclp8BauleRMHSYS7NjZTRKr880LdT3hU Kw+u3E/PvPm3a3nZJNMREDbWd6CMJ9gbWh2O7LMHq8FbFfck6SjdNrQ27RtBrtmgI8qQ lffw== X-Gm-Message-State: AOAM533bOJL1a0DMZP7Rl1yj6S8Job0ArrZr7IUxSW/yf4IiPEKoxATb AdNi76MDqs7BGFF+JxZ3IH1S3XqEwVdMFg== X-Google-Smtp-Source: ABdhPJxQnnRF3vFGMNQD8f9kgH4uBN0C9i1UwTU64XSIdTRdJHukLjnCznYARN/GhfY2TBK+dbJGMQ== X-Received: by 2002:a65:524b:: with SMTP id q11mr1455199pgp.372.1598624405567; Fri, 28 Aug 2020 07:20:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 26/76] target/microblaze: Use DISAS_NORETURN Date: Fri, 28 Aug 2020 07:18:39 -0700 Message-Id: <20200828141929.77854-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200828141929.77854-1-richard.henderson@linaro.org> References: <20200828141929.77854-1-richard.henderson@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=2607:f8b0:4864:20::444; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x444.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: , Cc: edgar.iglesias@xilinx.com 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" Both exceptions and gen_goto_tb do not return. Use the official DISAS_NORETURN enumerator for this case. This eliminates all use of DISAS_TB_JUMP. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 0c9b4ffa5a..53ca0bfb38 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -51,7 +51,6 @@ /* is_jmp field values */ #define DISAS_JUMP DISAS_TARGET_0 /* only pc was modified dynamically */ #define DISAS_UPDATE DISAS_TARGET_1 /* cpu state was modified dynamically= */ -#define DISAS_TB_JUMP DISAS_TARGET_2 /* only pc was modified statically */ =20 static TCGv_i32 cpu_R[32]; static TCGv_i32 cpu_pc; @@ -111,7 +110,7 @@ static void gen_raise_exception(DisasContext *dc, uint3= 2_t index) =20 gen_helper_raise_exception(cpu_env, tmp); tcg_temp_free_i32(tmp); - dc->is_jmp =3D DISAS_UPDATE; + dc->is_jmp =3D DISAS_NORETURN; } =20 static void gen_raise_exception_sync(DisasContext *dc, uint32_t index) @@ -149,6 +148,7 @@ static void gen_goto_tb(DisasContext *dc, int n, target= _ulong dest) tcg_gen_movi_i32(cpu_pc, dest); tcg_gen_exit_tb(NULL, 0); } + dc->is_jmp =3D DISAS_NORETURN; } =20 /* @@ -1675,7 +1675,6 @@ void gen_intermediate_code(CPUState *cs, TranslationB= lock *tb, int max_insns) } else if (dc->jmp =3D=3D JMP_DIRECT) { t_sync_flags(dc); gen_goto_tb(dc, 0, dc->jmp_pc); - dc->is_jmp =3D DISAS_TB_JUMP; } else if (dc->jmp =3D=3D JMP_DIRECT_CC) { TCGLabel *l1 =3D gen_new_label(); t_sync_flags(dc); @@ -1684,8 +1683,6 @@ void gen_intermediate_code(CPUState *cs, TranslationB= lock *tb, int max_insns) gen_goto_tb(dc, 1, dc->pc); gen_set_label(l1); gen_goto_tb(dc, 0, dc->jmp_pc); - - dc->is_jmp =3D DISAS_TB_JUMP; } break; } @@ -1717,7 +1714,9 @@ void gen_intermediate_code(CPUState *cs, TranslationB= lock *tb, int max_insns) } t_sync_flags(dc); =20 - if (unlikely(cs->singlestep_enabled)) { + if (dc->is_jmp =3D=3D DISAS_NORETURN) { + /* nothing more to generate */ + } else if (unlikely(cs->singlestep_enabled)) { TCGv_i32 tmp =3D tcg_const_i32(EXCP_DEBUG); =20 if (dc->is_jmp !=3D DISAS_JUMP) { @@ -1730,16 +1729,14 @@ void gen_intermediate_code(CPUState *cs, Translatio= nBlock *tb, int max_insns) case DISAS_NEXT: gen_goto_tb(dc, 1, npc); break; - default: case DISAS_JUMP: case DISAS_UPDATE: /* indicate that the hash table must be used to find the next TB */ tcg_gen_exit_tb(NULL, 0); break; - case DISAS_TB_JUMP: - /* nothing more to generate */ - break; + default: + g_assert_not_reached(); } } gen_tb_end(tb, num_insns); --=20 2.25.1