From patchwork Wed May 19 12:51:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 442410 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1310381jac; Wed, 19 May 2021 06:14:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNk3vv23gAbj+jyYgWUSzJIO2Dg7nLquEo35C1Oi2IN03ad4U7komOKWZaq6SwgEWjfjem X-Received: by 2002:a05:6e02:547:: with SMTP id i7mr1802344ils.281.1621430089989; Wed, 19 May 2021 06:14:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621430089; cv=none; d=google.com; s=arc-20160816; b=hxm3zXwT6PRIj7oxkVRAlzrXFP1bLmoUatsphaMb3ma8tJOWhqFw9AzF6YtANDD0Be WmjqneLA9yqi5dvYn8Exu5nXCVX6/ts3zuQI9GVkpEh1QTrurKWnyzNvvhSaFNNJ1bb+ EZhi5bm9unn0PBYQ0OmwsMGlsu3JpY9KZOuln10CipKyEnmjOUCo0OOidz2niGWNDJm+ bZOs92CoXbCeODzLlckpo6knUhPMwN03hNXKt8zv5jJIS4gPcN2Y/Vw9f88LpKmmlrSP EmE8kxzY92Tv/bsVxkR4rbGIKoNT/qfnYLlfXJ7Ss7RsdacoQvfMAVGufRfgcg+OA/OK GJsA== 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=OJcuu225j/tehJ3BKmA77DL3XThl82j6qo9KAyuEGK8=; b=DbOdPni9OuEdEqYqbSz8clG2/Dq+7oX8kRyLieVIzs0mEkcD/rlLLLgRURyF/qo1Yy Av/L/1TrRxI5v0mo1HnzayhtbmpIwua3ieNTWbpjxSG+KHR/p9cgcifSaCEi/3n/S8um zbpQGsKzRfaKwYpLv52herT0nXViUJCXqi7qI54djVt/PX5eSSabBm5hVQMLrW9Qefkj 16Mf7j+oB5VnJT8poa/qDPYd1xfqWxBzBZDVxh82hRaEH+4abtLpnUJoozM0+K/yPJCx Am1Sqb7HRpF6ctNyRJcHg77mUYZvhhHet5slMkZPS5Un69jSXVO4i++8On75M8vcLdKF G0Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gibson.dropbear.id.au header.s=201602 header.b=I4ex2exf; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m12si25858861jav.104.2021.05.19.06.14.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 May 2021 06:14:49 -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=@gibson.dropbear.id.au header.s=201602 header.b=I4ex2exf; 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" Received: from localhost ([::1]:33690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljM2D-0002FK-BR for patch@linaro.org; Wed, 19 May 2021 09:14:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljLgw-00014S-4g; Wed, 19 May 2021 08:52:50 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:53981) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljLgt-0001Hm-D5; Wed, 19 May 2021 08:52:49 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4FlXnh0Wt6z9t14; Wed, 19 May 2021 22:52:07 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1621428728; bh=lZBgIw0SlgXOfbn5GD7Ll+G4Zu67hb55WBfuEMoa71E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I4ex2exfdJz3uhBdR0wbGN2RTsvRF494MjllljKBiEwBz7BfzZ64JN1CFrXgb4+PV kDVun5PgIbCCf6Rbx16p2TfHTCqgLaBmhsibqDtXHNik84RxSatPolHXa5HtcToQet jpKAopfL7YSI58/VE/1gBvMie1grH1xHHIqcyN/A= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 23/48] target/ppc: Replace POWERPC_EXCP_SYNC with DISAS_EXIT Date: Wed, 19 May 2021 22:51:23 +1000 Message-Id: <20210519125148.27720-24-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210519125148.27720-1-david@gibson.dropbear.id.au> References: <20210519125148.27720-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Received-SPF: pass client-ip=2401:3900:2:1::2; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: richard.henderson@linaro.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Bruno Larsen , Matheus Ferst , David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Remove the synthetic "exception" after no more uses. Signed-off-by: Richard Henderson Signed-off-by: Matheus Ferst Message-Id: <20210512185441.3619828-9-matheus.ferst@eldorado.org.br> Reviewed-by: Bruno Larsen (billionai) Signed-off-by: David Gibson --- target/ppc/cpu.h | 1 - target/ppc/translate.c | 27 +++++++++------------------ 2 files changed, 9 insertions(+), 19 deletions(-) -- 2.31.1 diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index f43ceec5cb..99ee1e09b2 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -135,7 +135,6 @@ enum { POWERPC_EXCP_STOP = 0x200, /* stop translation */ POWERPC_EXCP_BRANCH = 0x201, /* branch instruction */ /* QEMU exceptions: special cases we want to stop translation */ - POWERPC_EXCP_SYNC = 0x202, /* context synchronizing instruction */ POWERPC_EXCP_SYSCALL_USER = 0x203, /* System call in user mode only */ }; diff --git a/target/ppc/translate.c b/target/ppc/translate.c index c879b47dc6..047d872c6b 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -362,14 +362,6 @@ static inline void gen_stop_exception(DisasContext *ctx) ctx->exception = POWERPC_EXCP_STOP; } -#ifndef CONFIG_USER_ONLY -/* No need to update nip here, as execution flow will change */ -static inline void gen_sync_exception(DisasContext *ctx) -{ - ctx->exception = POWERPC_EXCP_SYNC; -} -#endif - /*****************************************************************************/ /* SPR READ/WRITE CALLBACKS */ @@ -5032,7 +5024,7 @@ static void gen_rfi(DisasContext *ctx) } gen_update_cfar(ctx, ctx->cia); gen_helper_rfi(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif } @@ -5049,7 +5041,7 @@ static void gen_rfid(DisasContext *ctx) } gen_update_cfar(ctx, ctx->cia); gen_helper_rfid(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif } @@ -5066,7 +5058,7 @@ static void gen_rfscv(DisasContext *ctx) } gen_update_cfar(ctx, ctx->cia); gen_helper_rfscv(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif } #endif @@ -5079,7 +5071,7 @@ static void gen_hrfid(DisasContext *ctx) /* Restore CPU state */ CHK_HV; gen_helper_hrfid(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif } #endif @@ -6920,7 +6912,7 @@ static void gen_rfsvc(DisasContext *ctx) CHK_SV; gen_helper_rfsvc(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -7300,7 +7292,7 @@ static void gen_rfci_40x(DisasContext *ctx) CHK_SV; /* Restore CPU state */ gen_helper_40x_rfci(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -7312,7 +7304,7 @@ static void gen_rfci(DisasContext *ctx) CHK_SV; /* Restore CPU state */ gen_helper_rfci(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -7327,7 +7319,7 @@ static void gen_rfdi(DisasContext *ctx) CHK_SV; /* Restore CPU state */ gen_helper_rfdi(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -7340,7 +7332,7 @@ static void gen_rfmci(DisasContext *ctx) CHK_SV; /* Restore CPU state */ gen_helper_rfmci(cpu_env); - gen_sync_exception(ctx); + ctx->base.is_jmp = DISAS_EXIT; #endif /* defined(CONFIG_USER_ONLY) */ } @@ -9238,7 +9230,6 @@ static void ppc_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) case POWERPC_EXCP_BRANCH: ctx->base.is_jmp = DISAS_NORETURN; break; - case POWERPC_EXCP_SYNC: case POWERPC_EXCP_STOP: ctx->base.is_jmp = DISAS_EXIT; break;