From patchwork Mon Oct 24 13:24:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617876 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2744060pvb; Mon, 24 Oct 2022 07:05:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7YhfGqtMQl+lsVrA6QFbBdFjumTIcsCVGGdRwV3D6O+83bL0Z4v8G9bePP1E4EKG+WPg6w X-Received: by 2002:a5d:4fc2:0:b0:236:66ce:5e2e with SMTP id h2-20020a5d4fc2000000b0023666ce5e2emr6394350wrw.638.1666620331276; Mon, 24 Oct 2022 07:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666620331; cv=none; d=google.com; s=arc-20160816; b=ZySb1G0yh6EoR82F/68MQyji4DNTzQv8K/USAfXmc91x9v6YeAhWYjZymYDXG/vtaj s9VB+97ngc2481G4TtFPvWFzHQYdhFvlgYLdDxgDBvCFitoCZYmTH6qxO9ofpJxKm0yX xcvJabMH89hI+MgcxD7OBEi6cJIhkMrxcGPpniSoBdKjLsXHnQHYZIOnptIRrBQrUP7p HItSqOO8+Q8jWZpafvrHQSIEL7AdX5SHrkDpV7rVjOjzqnLlubuHUZIsqypzgBhFMfxm C0UkLvpwAPBm28lv8kljeb3MrMfvPs6nxXDPJwBFwqRzTY1hAIo8jhHpG0Hx0AQ/CDtq hBqA== 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=cY7FAyxwYmVho+YuvFv5lJrrcsTnuKViFvoEAlMwTHQ=; b=y6waSCtMml289C1LqOInuvlOKu+7jiuG7ywYho8VMul7Klu/5qRc7WD09OL4zR+UGq 4/PKKtIRdrA69+odPm/LkW5TshFbHlPstMv0IV86qRfLdjq6ewj8fHHaiw6695MfYlBW KXFaaM5OQHlsbw/dBRt3qHb7kXoDRchI3TJ7QZeatA2uiMcrDEtzHPQYcD2fFGD/5i2q H6CyMNJ/ZKv2BVFELBkN9HKlh9wNJ3oYkHFimPEdx4fBN7h715roC7a+c9GViFOz5ezn IDTjaJgbDrV1EG+yVo2+JERmRf9tNs9jNqosqk95PbQcvJ/uyhSLgnQ3Xyx5T731hOsR U5aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WtdgWSa0; 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 cl8-20020a5d5f08000000b002366c51b994si3475471wrb.740.2022.10.24.07.05.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 07:05:31 -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=WtdgWSa0; 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 1omxTK-0003fe-Ri; Mon, 24 Oct 2022 09:26:30 -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 1omxT8-0003W4-RD for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:20 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSr-00045N-VJ for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:12 -0400 Received: by mail-pj1-x102c.google.com with SMTP id h14so8118824pjv.4 for ; Mon, 24 Oct 2022 06:26:01 -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=cY7FAyxwYmVho+YuvFv5lJrrcsTnuKViFvoEAlMwTHQ=; b=WtdgWSa0X+ZiploRgY4FHlVLXa8v7k4soMXLDJQP0Zqy11Pv9OjPA9swlUbXaJOlYF q8paM8dX2wjEpkEKmWltgh7sLmD7pZ31W8pU6fi7bnNehv/lwueNwXxyiMpW6qLQR/2o LfKnNXk2rrsYhJu9R0rGpx/t7IXqsGP71l0eEHtzGl+kx5bh+5GsJntb1HyKZn29bt/0 Go9ZfxpXJzGnqYRu2HMbpY1K0QnKNKLstjaPaScWaPNelV//LNLZsFIMuKTXnf0ejAOg MtEEFXNQHFHTXeG9BUmsL1wHr0+63ATposECGyAD6uoi6jDB54c6tDK0GJyLOcAW2zl/ TkuQ== 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=cY7FAyxwYmVho+YuvFv5lJrrcsTnuKViFvoEAlMwTHQ=; b=P0XlWGijIeNCUMl94MI1fWqAcgzS0xUsqFmbBBz63+8AP/K32+I6KP7fyw3hc7NkB2 Z3ExJOBjM1+609UTVENPi3zZNqOtP9RQJbXFF0Yob1U6+5mp83rqgCQgsLtbTnwatUtu x1ma0qTiM9IB5EmZRCuNqr350WxktZwpzD5rNPRwkaQexBhtZjs0j7gE28Y3JVY0qzJU K+3S5hNcB2R73AfLvF+J1il7u4i2kdMNMZb9Lc0OeNqL33KXukOpPDI6O2hFR3FcJNGh +GM4S5flJ60X51TSMUlx3w8fWHq41JerYeQ5fQ04XMj1cu7xxwvHSZIQ+b2Zc1wgcrfx yTRg== X-Gm-Message-State: ACrzQf2n8lS7kAh42/0jdI5jeyC7n0JBT29vPjdxQX4W/t8xdZaxiO1+ qYimE7stPo+eJYF3ii4UTSOCv40siC8ZUw== X-Received: by 2002:a17:903:2c9:b0:182:c500:d93d with SMTP id s9-20020a17090302c900b00182c500d93dmr34346726plk.44.1666617960254; Mon, 24 Oct 2022 06:26:00 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 20/29] target/sparc: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:50 +1000 Message-Id: <20221024132459.3229709-22-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::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.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, 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/sparc/cpu.h | 3 +++ target/sparc/cpu.c | 1 + target/sparc/translate.c | 7 +++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index f80ea2e8cf..e478c5eb16 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -600,6 +600,9 @@ int sparc_cpu_memory_rw_debug(CPUState *cpu, vaddr addr, /* translate.c */ void sparc_tcg_init(void); +void sparc_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data); /* cpu-exec.c */ diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 1f9ef7afd8..4c3d08a875 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -872,6 +872,7 @@ static const struct SysemuCPUOps sparc_sysemu_ops = { static const struct TCGCPUOps sparc_tcg_ops = { .initialize = sparc_tcg_init, .synchronize_from_tb = sparc_cpu_synchronize_from_tb, + .restore_state_to_opc = sparc_restore_state_to_opc, #ifndef CONFIG_USER_ONLY .tlb_fill = sparc_cpu_tlb_fill, diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 2cbbe2396a..34858eb95f 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -6011,9 +6011,12 @@ void sparc_tcg_init(void) } } -void restore_state_to_opc(CPUSPARCState *env, TranslationBlock *tb, - target_ulong *data) +void sparc_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) { + SPARCCPU *cpu = SPARC_CPU(cs); + CPUSPARCState *env = &cpu->env; target_ulong pc = data[0]; target_ulong npc = data[1];