From patchwork Mon Oct 24 13:24:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617890 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2805469pvb; Mon, 24 Oct 2022 08:43:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6TXqJxNTA+zKearxDnf2l5DY3V0iG3QJB8HHpQf2Atw34JPRPpgm1KWrs36+t2dJjsVEr9 X-Received: by 2002:a05:620a:20c7:b0:6f6:4a82:1d7 with SMTP id f7-20020a05620a20c700b006f64a8201d7mr1950631qka.483.1666626181913; Mon, 24 Oct 2022 08:43:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666626181; cv=none; d=google.com; s=arc-20160816; b=ASWR/Hci0ZX12rKAh77L6i0PoJVoWtfEhIKjAvSkesZDaC7l4olx+dIBgGQdxyIyED ihrmDIqbuzjQ/94onhBiXM7LvaYGxE0blVr9ODu3gX9LZY3six+YB5RooUzr0OYkoL3P iAP7fouWgYSMipuNI5H08KNqE4aOH4FK3bB0T3LR3C6E/kZ0WOHsy8O+2ExlWqeuHAoN jeTfGpMKgehwjbZ4p+IyEu3s+FuJTZpCtNd/WtXHShDtiNkAzHxr8Jqn02QmYoMToawR TIMXfFCltqF7S7H28GUMy13aNv3KmNqILKDxxP6+eA+rvOWWzfcNsZsORyWyA3WB2kt+ ofwA== 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=DjUS+tQaX/U5U5rcl8RyljhouuNX2K7mx9ij2CFhI3s=; b=ytYNDg/4PbxGGaojNh33Zp4cf02Ii2dicneDN60OcX6LphbV5wGWVuteYTWxeSBN9U uMuY+Hx6kM2VHy47ex5rP7ny6mH/rt0yl0iHJ3FOcsuO8Vqn2tzZ4ay8SBIsyGHjmcKx npLWdnu6idRhM59WS/4jWIrFvM6R2HAX6i1ftl805IuqjbA2Kprn1YNFpGsns4WXHVPJ lV8gjYbuft2xoQuYGV83+hS2QioEgk0q7LTcxaA2aPK4Y58QwyjvFJJagi4MEwbizX0U n+BrQeCaJ8Hn/b7uUhyquizWkCcnP4iJyZvATzMu0e7CIJ87+PqsULt5+w91TzH8nEzB Ke3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wLo+IZiH; 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 x144-20020a376396000000b006cdeaaee734si157855qkb.217.2022.10.24.08.43.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 08:43:01 -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=wLo+IZiH; 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 1omxSc-0003MB-2E; Mon, 24 Oct 2022 09:25:46 -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 1omxSW-0003I3-KL for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:41 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSU-00040G-9f for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:39 -0400 Received: by mail-pl1-x631.google.com with SMTP id p6so8427309plr.7 for ; Mon, 24 Oct 2022 06:25:37 -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=DjUS+tQaX/U5U5rcl8RyljhouuNX2K7mx9ij2CFhI3s=; b=wLo+IZiHcupTAxZy7izbaHOT8SpjbHOupkwvcbsJP+w+8dI15gOqpN8rBq3KmQCHFT OARmniC4eDu+uTI35k+8Zvl3lf2uKh+/MhfcWjSInnt3XQ0fgXy1lKO92fsHVSCaTCGT x1af5nhDX5gG/0xVUtIdkURvyI3tRZ4tHETVlzplch67c1xSZrS4NpLwaxG6W6YGQ+Sw 3VTbni3OBBF/7OWFvwWUZQj4RrIX0pqe6hByx7HT7Q3cIe+3zDA6HrxeVOPM+19AC6ER nJ/NY9q+7pFrpON5g0kw2rZRZEKRUnV9+U+11jXhMOLSMBQFfBBU44+7dBFXyclhhXR7 7gng== 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=DjUS+tQaX/U5U5rcl8RyljhouuNX2K7mx9ij2CFhI3s=; b=mqtUZQiGJKKt7dZFU/zXaN2d8kPC2fzhhrZOUZTiFTUc+BeD2w5LucTenVTYVdxZdX Pjzxw4wTUe6CcHHCCXpQMurFAD+u16tTkmS7GtTbAhJjayjnf6BYhlKNrI5BYXmIzLYj favw8HXImeLPG19CS9oisbMpVY3fYQ73isIAs6ZAftiEwa23w/W5kKMCtFveCG3MNwtH EYwVFQ64hxcQgUZ2fh2AZ9qWwcgOD1LGI/KA0DXUrRssVmrDzKjJxx9+Z9YeOVb5ujCH rNV12YUjiFyqWG39f1XQbRbwAbowYMLEN/XO9HkZlRlXFuPunhyN+bbFMZLI0+17Nvh0 1Mig== X-Gm-Message-State: ACrzQf2Olj5q97MlSlHvLC3HEIuQjYtwbmi7uHJLPPKaSlhmHio66oPd Ku4xXpnnFjxGH2iujz5sgAa8pzNz/82orA== X-Received: by 2002:a17:902:6bcc:b0:182:df88:e6c8 with SMTP id m12-20020a1709026bcc00b00182df88e6c8mr33739025plt.117.1666617936758; Mon, 24 Oct 2022 06:25:36 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 10/29] target/m68k: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:40 +1000 Message-Id: <20221024132459.3229709-12-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::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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/m68k/cpu.c | 14 ++++++++++++++ target/m68k/translate.c | 10 ---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 1e902e1ef0..b67ddea2ae 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -38,6 +38,19 @@ static vaddr m68k_cpu_get_pc(CPUState *cs) return cpu->env.pc; } +static void m68k_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + M68kCPU *cpu = M68K_CPU(cs); + int cc_op = data[1]; + + cpu->env.pc = data[0]; + if (cc_op != CC_OP_DYNAMIC) { + cpu->env.cc_op = cc_op; + } +} + static bool m68k_cpu_has_work(CPUState *cs) { return cs->interrupt_request & CPU_INTERRUPT_HARD; @@ -524,6 +537,7 @@ static const struct SysemuCPUOps m68k_sysemu_ops = { static const struct TCGCPUOps m68k_tcg_ops = { .initialize = m68k_tcg_init, + .restore_state_to_opc = m68k_restore_state_to_opc, #ifndef CONFIG_USER_ONLY .tlb_fill = m68k_cpu_tlb_fill, diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 9df17aa4b2..5cbde4be34 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -6479,13 +6479,3 @@ void m68k_cpu_dump_state(CPUState *cs, FILE *f, int flags) env->mmu.mmusr, env->mmu.ar); #endif } - -void restore_state_to_opc(CPUM68KState *env, TranslationBlock *tb, - target_ulong *data) -{ - int cc_op = data[1]; - env->pc = data[0]; - if (cc_op != CC_OP_DYNAMIC) { - env->cc_op = cc_op; - } -}