From nobody Tue Feb 10 11:33:13 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1619746592; cv=none; d=zohomail.com; s=zohoarc; b=efy/6/FcVwxBB+3pi53U8pnlmnAJWx255ruA4xHj1h67Yg7inSd4Ihc6QQ5Sqcb3TmTUcjsqqgZOLoaBacVKyLZfV+WLMQ3/FafCCi9ida2YCo6JaerclEH91dEcI+QJUMDRgV9/0hIVykfelxWHiI1PpxMqBrDkSh0qV5zTZJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619746592; 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=BUG5NdpCvCLBDV3mEQiJZX4nWaWXd3Zyx+1DQFsvHC4=; b=QEu+bngy308w2CIwUksFbZAZ2AsIJRL6Y/4ljbhFlT38icTiXCOI1UYjPfcc59etS1O7GR7T1F94fuWgdxLRZMJMODA4EXwE+9LovAotOtb6jbXgm+11us7+Y4CB+WFgsxRMWsPURIKFmMImCLE7EUj35XiE0YOL/gHsWHJ/3E4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail 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 1619746592280521.6126607713607; Thu, 29 Apr 2021 18:36:32 -0700 (PDT) Received: from localhost ([::1]:55144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcI51-0007TF-8H for importer@patchew.org; Thu, 29 Apr 2021 21:36:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcHlU-0003D4-S5 for qemu-devel@nongnu.org; Thu, 29 Apr 2021 21:16:20 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:43910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcHl7-0007YH-3m for qemu-devel@nongnu.org; Thu, 29 Apr 2021 21:16:20 -0400 Received: by mail-pl1-x62f.google.com with SMTP id v20so8460994plo.10 for ; Thu, 29 Apr 2021 18:15:55 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id 1sm161277pjx.46.2021.04.29.18.15.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 18:15:54 -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=BUG5NdpCvCLBDV3mEQiJZX4nWaWXd3Zyx+1DQFsvHC4=; b=yyZnlhcMhPk3VVjRRKfPn9af21+phu5cQniiOQszJYHR75JdNyE4haP/nIHWP7e8/l RbI1y9OMheJRWWGTnTPftYJl58wYEYJ58byCUoW3LdC3+QHareSpl0v3YmhY+wObFvzt 5pj7+qsmzdsxedtrtjr/FiFZZZtZ+T9ZKKqya1K/2LgauSPBxDiiTfgYWHjFAmK3Uas7 DKqkgSe/GO5pQORP1U2xearsr/ZGAiSd2JrcE77716WtxW87ykkEqIEMrapVDJzEsQSl 0SfOs30/mdR9CYNtcIE9v7n2P3h9qZ2G9fDWmegrj2WdURN6Wku+/1KhCkJXXElpTAI5 6aFA== 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=BUG5NdpCvCLBDV3mEQiJZX4nWaWXd3Zyx+1DQFsvHC4=; b=S6Q8IQar47FZYlNM52mNDL7EpEYMTwX7VLmdWuJYSI8Qgq8PkV3QB4vs7hwgHSXLt8 /g3qKxqV1cF1uEZrb09g6Vu1tg0nKxka7BJs4I/5CfUOirgLVq97DLTWWADu1ZzoVbID ZjqrnDkVwrmjVgw1XVJcJ0gg0WLu1xFHHA4SF3DRc+dAk8lrPzNWJxJ8cVjtPWM9e+Ly a4YZ4cd3T8Ud/kaawMsTfuKqs3o2x5aOuIHRRn7VqNNFMYBJ+DVLAKbUPMpRSl+KQ3eC auPfgHTj/y4N07znWpSqt/WBlM/FGczgwtcSM+nAbpCLmfhjYW7cCqo0MB2ajWA7kL71 +FMw== X-Gm-Message-State: AOAM533RuZMdIjwMZKrMloYal1Mix0weXleIO+AMg8XNssUHD2moSeFQ j31MgFFBHZ4pkCryQTbA5ZPs6HPS+oEBQg== X-Google-Smtp-Source: ABdhPJwu3/dvb9g8IDgdwbnnoWqOI9DyN01nCtp9Asy2GX0ndptSPA8xUT6V0gpOS5ZE+HOmT6rYpQ== X-Received: by 2002:a17:90a:9f4b:: with SMTP id q11mr12217886pjv.180.1619745354668; Thu, 29 Apr 2021 18:15:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 15/30] target/ppc: Replace POWERPC_EXCP_STOP with DISAS_EXIT_UPDATE Date: Thu, 29 Apr 2021 18:15:28 -0700 Message-Id: <20210430011543.1017113-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210430011543.1017113-1-richard.henderson@linaro.org> References: <20210430011543.1017113-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::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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=unavailable 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: f4bug@amsat.org, luis.pires@eldorado.org.br, qemu-ppc@nongnu.org, lagarcia@br.ibm.com, bruno.larsen@eldorado.org.br, matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Remove the synthetic "exception" after no more uses. Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 1 - linux-user/ppc/cpu_loop.c | 3 --- target/ppc/translate.c | 20 +++++--------------- target/ppc/translate_init.c.inc | 4 ++-- 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index cf10117065..9bb370abba 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -132,7 +132,6 @@ enum { /* EOL = */ POWERPC_EXCP_NB =3D 103, /* QEMU exceptions: used internally during code translation = */ - POWERPC_EXCP_STOP =3D 0x200, /* stop translation = */ POWERPC_EXCP_BRANCH =3D 0x201, /* branch instruction = */ /* QEMU exceptions: special cases we want to stop translation = */ POWERPC_EXCP_SYSCALL_USER =3D 0x203, /* System call in user mode only = */ diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c index df71e15a25..4c308835bd 100644 --- a/linux-user/ppc/cpu_loop.c +++ b/linux-user/ppc/cpu_loop.c @@ -423,9 +423,6 @@ void cpu_loop(CPUPPCState *env) cpu_abort(cs, "Maintenance exception while in user mode. " "Aborting\n"); break; - case POWERPC_EXCP_STOP: /* stop translation = */ - /* We did invalidate the instruction cache. Go on */ - break; case POWERPC_EXCP_BRANCH: /* branch instruction: = */ /* We just stopped because of a branch. Go on */ break; diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 45cd3189c0..82fdf0bb77 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -367,13 +367,6 @@ static inline void gen_hvpriv_exception(DisasContext *= ctx, uint32_t error) gen_exception_err(ctx, POWERPC_EXCP_HV_EMU, POWERPC_EXCP_PRIV | error); } =20 -/* Stop translation */ -static inline void gen_stop_exception(DisasContext *ctx) -{ - gen_update_nip(ctx, ctx->base.pc_next); - ctx->exception =3D POWERPC_EXCP_STOP; -} - #define GEN_HANDLER(name, opc1, opc2, opc3, inval, type) = \ GEN_OPCODE(name, opc1, opc2, opc3, inval, type, PPC_NONE) =20 @@ -3157,7 +3150,7 @@ static void gen_isync(DisasContext *ctx) gen_check_tlb_flush(ctx, false); } tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC); - gen_stop_exception(ctx); + ctx->base.is_jmp =3D DISAS_EXIT_UPDATE; } =20 #define MEMOP_GET_SIZE(x) (1 << ((x) & MO_SIZE)) @@ -4434,7 +4427,7 @@ static void gen_mtmsrd(DisasContext *ctx) gen_helper_store_msr(cpu_env, cpu_gpr[rS(ctx->opcode)]); } /* Must stop the translation as machine state (may have) changed */ - gen_stop_exception(ctx); + ctx->base.is_jmp =3D DISAS_EXIT_UPDATE; #endif /* !defined(CONFIG_USER_ONLY) */ } #endif /* defined(TARGET_PPC64) */ @@ -4477,7 +4470,7 @@ static void gen_mtmsr(DisasContext *ctx) tcg_temp_free(msr); } /* Must stop the translation as machine state (may have) changed */ - gen_stop_exception(ctx); + ctx->base.is_jmp =3D DISAS_EXIT_UPDATE; #endif } =20 @@ -6614,7 +6607,7 @@ static void gen_wrtee(DisasContext *ctx) * Stop translation to have a chance to raise an exception if we * just set msr_ee to 1 */ - gen_stop_exception(ctx); + ctx->base.is_jmp =3D DISAS_EXIT_UPDATE; #endif /* defined(CONFIG_USER_ONLY) */ } =20 @@ -6628,7 +6621,7 @@ static void gen_wrteei(DisasContext *ctx) if (ctx->opcode & 0x00008000) { tcg_gen_ori_tl(cpu_msr, cpu_msr, (1 << MSR_EE)); /* Stop translation to have a chance to raise an exception */ - gen_stop_exception(ctx); + ctx->base.is_jmp =3D DISAS_EXIT_UPDATE; } else { tcg_gen_andi_tl(cpu_msr, cpu_msr, ~(1 << MSR_EE)); } @@ -8083,9 +8076,6 @@ static void ppc_tr_translate_insn(DisasContextBase *d= cbase, CPUState *cs) case POWERPC_EXCP_BRANCH: ctx->base.is_jmp =3D DISAS_NORETURN; break; - case POWERPC_EXCP_STOP: - ctx->base.is_jmp =3D DISAS_EXIT; - break; default: /* Every other ctx->exception should have set NORETURN. */ g_assert_not_reached(); diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.= inc index 9af3fb2066..f3e79b8685 100644 --- a/target/ppc/translate_init.c.inc +++ b/target/ppc/translate_init.c.inc @@ -463,7 +463,7 @@ static void spr_write_hid0_601(DisasContext *ctx, int s= prn, int gprn) { gen_helper_store_hid0_601(cpu_env, cpu_gpr[gprn]); /* Must stop the translation as endianness may have changed */ - gen_stop_exception(ctx); + ctx->base.is_jmp =3D DISAS_EXIT_UPDATE; } #endif =20 @@ -511,7 +511,7 @@ static void spr_write_40x_dbcr0(DisasContext *ctx, int = sprn, int gprn) gen_store_spr(sprn, cpu_gpr[gprn]); gen_helper_store_40x_dbcr0(cpu_env, cpu_gpr[gprn]); /* We must stop translation as we may have rebooted */ - gen_stop_exception(ctx); + ctx->base.is_jmp =3D DISAS_EXIT_UPDATE; } =20 static void spr_write_40x_sler(DisasContext *ctx, int sprn, int gprn) --=20 2.25.1