From patchwork Mon Oct 24 13:24:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617891 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2815650pvb; Mon, 24 Oct 2022 09:02:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5kDGfQuxlDWdbDm70zCc8CcqCX/vO3R8C4Ec5HLcxwSkG7VPT0c1oaFMUFvtvI1tyVGg+j X-Received: by 2002:a37:9ac8:0:b0:6ea:a959:3eb5 with SMTP id c191-20020a379ac8000000b006eaa9593eb5mr23077964qke.551.1666627328018; Mon, 24 Oct 2022 09:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666627328; cv=none; d=google.com; s=arc-20160816; b=FLPHBF8ZrP0sLT8ROoqDR5j0QfY3uYzcEjZgMJo66deRTrDdsMoELBF8xWeDRIYgHR 2i5hAUHE29xyDRtp2JYPLKrHbSuVUfdJkwcJj18pagexDegBNWUZxKmmpxUgumRgF/x3 7gR8h9XlO8mAD6kLQLMub4hxlE/n5PZ7pU0hbhsxS8WnqvfogH2mMp6NaQS5XyYyIJ4Q JJz3cPxNHEL6KRsO9d21WUrZd8mV/WwJY3dQ09DzT2Mvgad+9i0o7S6gOQf8Tfk2iq53 5Vrt/3x4EE2LJcXv3B9sXW54ftcnpD7dMpKpYDaYTLTNozcHiiygUyBdfzKoaCTkvJw+ ASfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender: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=qyxkF9rav08pAN066OMHtqVcS93bmJM30Eii8isiVIE=; b=SjIUjtjS7CAYYvRFwOtTt0Fcpa7MspbxZh+/VT+ihCx9yHSPKy1+SqJw/6YWDvTcrL U550z0p4qrpqRQKPHs1g5jR53jGvxRMqLJ8weL0dUXKSjrbjrDe0H44ugsOxfa7YjZDR +L9qoaVdofqgqq+wAcOqI7XyK9ZIWQCWKGhtTdzyvF85jJ9EqegHwYYgFszNm4ia9mJ/ aLJD/31GoSVNo0fR1OKtJJIcqT8aqhVvmkN7cQk/4gKf0rPEh3116aXTKVmhG5vsTMxS Scpvv4LGbE+zsH0riHw1q3+0ts4W8l5UJhikGZH8+C4iyw7id+AjZ/ECrIH+QScqQFva 1t+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kxx19Bi3; 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 l13-20020a37f90d000000b006f64a8201fdsi172613qkj.595.2022.10.24.09.02.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 09:02:08 -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=kxx19Bi3; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTF-0003c4-BT; Mon, 24 Oct 2022 09:26:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1omxSs-0003RD-7k for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:02 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSq-00044I-IC for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:01 -0400 Received: by mail-pf1-x431.google.com with SMTP id g62so4933362pfb.10 for ; Mon, 24 Oct 2022 06:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qyxkF9rav08pAN066OMHtqVcS93bmJM30Eii8isiVIE=; b=kxx19Bi3JxnHIkdixfbFVeHn2cjovhsKLGnaDOfrESyGnlT/laelcVDHOSKSDKcfS1 G64bneLc6+ymKdkDimoclafmoSibO7Hjrw76uSC14uHS5PsVF5OwxTyY3HnZ+pS3owQH h/0IUofI+MQKir9KrEUSx8b+fg60Oh6gG1Av81a9RmNC1OWovObwHlaIjFswUQIA3aVS EKCqbnmlvI2isMDA2EFI3ocGIvh7usQHA0aJKWfn3o2HDwvlH3JyVyrOHU/Q4plAxqac vZhQ9StrTf90Xjf8RfFbVSTMVx5/N741Iy7btn9X/w6xAMm8IMboGMWNXu+ko3Fyx438 zvzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qyxkF9rav08pAN066OMHtqVcS93bmJM30Eii8isiVIE=; b=us43t+FtCk7JerMxxkahFhDIb3MIw3+/nw8rnlqV46NjyncJHAVC47Of1J01/wXBQr AuA3qoum0LU6D9W/+/OIONeyU20GfTK70zHTyXD+xlmvoqGwP3en2stKbIbh+Kowy2Dk ZukL6uQSS8xOf+qX/vWzPUK1S7KKyd99tgAvedRib1D5NRM/1Mt+Zgy3dPk5Y7RSp4y+ eQzdCKzLcS1zJ5RGmvkVYWP+miKfo2Xp/RBV6Q2yLMX5zTaHiC88L1MuFeAolzyMJaD9 WUgfkD+yfmgO01hgwmh+cIRChG7LluUxXs8gW1b8wbh/8DvXjokwKmLSOoIuKIgAeydR LgHQ== X-Gm-Message-State: ACrzQf24Ra4LN/nbDWgUW98jzS+C6YzkCDG2X2wXpeSL2Pcpd3OJZXO6 2ZdaUL42wuNb55LAlx/F9lbSjXpP7BV/VQ== X-Received: by 2002:a05:6a00:238d:b0:563:b212:9257 with SMTP id f13-20020a056a00238d00b00563b2129257mr33370542pfc.21.1666617948828; Mon, 24 Oct 2022 06:25:48 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 15/29] target/ppc: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:45 +1000 Message-Id: <20221024132459.3229709-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221024132459.3229709-1-richard.henderson@linaro.org> References: <20221024132459.3229709-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/ppc/cpu_init.c | 10 ++++++++++ target/ppc/translate.c | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 763a8431be..335351c226 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7221,6 +7221,15 @@ static vaddr ppc_cpu_get_pc(CPUState *cs) return cpu->env.nip; } +static void ppc_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + PowerPCCPU *cpu = POWERPC_CPU(cs); + + cpu->env.nip = data[0]; +} + static bool ppc_cpu_has_work(CPUState *cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); @@ -7446,6 +7455,7 @@ static const struct SysemuCPUOps ppc_sysemu_ops = { static const struct TCGCPUOps ppc_tcg_ops = { .initialize = ppc_translate_init, + .restore_state_to_opc = ppc_restore_state_to_opc, #ifdef CONFIG_USER_ONLY .record_sigsegv = ppc_cpu_record_sigsegv, diff --git a/target/ppc/translate.c b/target/ppc/translate.c index e810842925..7228857e23 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7739,9 +7739,3 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns, translator_loop(cs, tb, max_insns, pc, host_pc, &ppc_tr_ops, &ctx.base); } - -void restore_state_to_opc(CPUPPCState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->nip = data[0]; -}