From patchwork Mon Oct 24 13:24:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617862 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2734659pvb; Mon, 24 Oct 2022 06:50:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5tro6O/wG72h1i9x9oAnMOLCzVJK5rOnBdUBlkC7krkPcPYFWHpiv6imSINsjhRgspZa8U X-Received: by 2002:a0c:8d4b:0:b0:4bb:798f:5251 with SMTP id s11-20020a0c8d4b000000b004bb798f5251mr2323254qvb.51.1666619428818; Mon, 24 Oct 2022 06:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666619428; cv=none; d=google.com; s=arc-20160816; b=CQcvpp9Zkb+rmwXuvHVI4isQsSUXlggPm5C7TsQAEf+NbuFU8FqSop30pHCMmquJTI jq1BkbVJ+3fw5o3a+faTK6CzMpp6jlWLWWkuXbYPPBuOzg31Ylvu2z3ZOU38R6AzEHES /TGAop7E1xFvHTk/TnHdWC3ePEFZxj1fnjlhVfYrtpmfVkZS9ho5P8Nrj2JTmqWFJvOX DFN9ih8dki0UrncgDgMeZjCjzNBhcn2YxxVy6fJEyXCBI2a/MJtp8EONiav3XQDgWptx iB7d6gK+hOs0MsE/w6nYDQI8mETvTg4DlmRywCPX89KY4icI9GKYUjZADj/7CLO1Elvl sFYg== 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=15gYJVhpNSUrbXoz3qxirZ/UPL1cauzIrIQSIYzfKtc=; b=GXh08YJVAsMzaW58Lx02VbBtE4136ijLegnbvXs0h5XuhRuN1+oaVIfN9tny/TlfxA RtFu9bRbLDRHQh70TFM0LPZI41+1xSQsZvDQQSdiRzTQ48THjlwnRx90rI/wdSDPuPPV 8ydtSM3uiwUdnfFRUtC515IaFGnMHXLs0YBNYQcQ4ZmMacOfB18/Us0xuVf88xAXruQD MfZRjTMCCg3mWGQb0RveOYRKYsZ9TcwgVju+OV/lTrWMH7rA/fE4vFrPLm8igJHlH9Vb +SlCIc6G7jSOxgtT2XRHSEZel4ab3dIMc0+TzieRFxjRu7qDjAsyFpAq35T+KwaBMMWb tthg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d3SB16Fx; 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 br9-20020a05622a1e0900b0039118ab8329si15669991qtb.500.2022.10.24.06.50.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 06:50:28 -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=d3SB16Fx; 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 1omxSN-0003GV-Av; Mon, 24 Oct 2022 09:25:32 -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 1omxSI-0003EG-T8 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:27 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSG-0003xA-Ru for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:26 -0400 Received: by mail-pf1-x432.google.com with SMTP id g16so3510413pfr.12 for ; Mon, 24 Oct 2022 06:25:23 -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=15gYJVhpNSUrbXoz3qxirZ/UPL1cauzIrIQSIYzfKtc=; b=d3SB16FxxolFvfaccy+Oqjd9GfyWTvDMInuIxczNNCpADOkda3o0/PaLzCw12jHi7j aIOJhvzO4fIMNf9p6Mi7ESDqOT5nQKN2/NaPLxkJdzozaDBhNa1fhjNvnZ4iQOozVJ/r LVfL2e1TVZIxIl5w9D7D6qT4D5guODx4rkHqpnaeHKnKT1UV7s3+rYVNgm+jfPLxdBIC fUYvvFJU6T+Do5B0IazqYL+yZGmEZZzYrGfjqhX+x+Ip2c89DlIGXZIqaOhomW8gJLXy aM/IkcC3YYn+w30vGnazo/7DkauskvOXSrUBC6sLrgaQHYngkgPq8O9Ba6uoed96ruSw xr2Q== 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=15gYJVhpNSUrbXoz3qxirZ/UPL1cauzIrIQSIYzfKtc=; b=meeCl1E5r//xJWG9lm+G2XgVeX/47T415JSAOFGWwFVL6H1qM7oMEfRMibtyg6wErm Tywfm02LXL49319FZYoynpB55KW2isfSR6yiB+a2QFYk5VRvo6FKPvrdahgd9WpqkeZ9 6toEqxmA18jLG3d7EQy+fRzkjcFOxwiYpnL2yrr9OBS8iyC1ck+tHa6U8cL9tN0C43mH wF4Q4Rif3DEABwiYj+FJs7OK11B//NX50KH0NAcPZ3QSD4Z3jzccyCCSwrmb3dkhqgpq qL3vRKou4csENiKMYezdyzeoNPs9Kjf9Yua9uNs9mCWTwHhEje2uxD8S/TsW0jKzPsMf /OLg== X-Gm-Message-State: ACrzQf2xx3VA/UTqYX8NomNSK9fx5BOb/0kN+S+IgeUgY/HKCJV9P66x N9lmBXm1e7FORd/0n3IWlLa6WKGkhhb4QQ== X-Received: by 2002:a05:6a00:408c:b0:565:fc2c:8c71 with SMTP id bw12-20020a056a00408c00b00565fc2c8c71mr33992517pfb.82.1666617922451; Mon, 24 Oct 2022 06:25:22 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 04/29] target/avr: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:34 +1000 Message-Id: <20221024132459.3229709-6-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::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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/avr/cpu.c | 11 +++++++++++ target/avr/translate.c | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 0d2861179d..c7295b488d 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -57,6 +57,16 @@ static void avr_cpu_synchronize_from_tb(CPUState *cs, env->pc_w = tb_pc(tb) / 2; /* internally PC points to words */ } +static void avr_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + AVRCPU *cpu = AVR_CPU(cs); + CPUAVRState *env = &cpu->env; + + env->pc_w = data[0]; +} + static void avr_cpu_reset(DeviceState *ds) { CPUState *cs = CPU(ds); @@ -202,6 +212,7 @@ static const struct SysemuCPUOps avr_sysemu_ops = { static const struct TCGCPUOps avr_tcg_ops = { .initialize = avr_cpu_tcg_init, .synchronize_from_tb = avr_cpu_synchronize_from_tb, + .restore_state_to_opc = avr_restore_state_to_opc, .cpu_exec_interrupt = avr_cpu_exec_interrupt, .tlb_fill = avr_cpu_tlb_fill, .do_interrupt = avr_cpu_do_interrupt, diff --git a/target/avr/translate.c b/target/avr/translate.c index e65b6008c0..2bed56f135 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -3055,9 +3055,3 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns, DisasContext dc = { }; translator_loop(cs, tb, max_insns, pc, host_pc, &avr_tr_ops, &dc.base); } - -void restore_state_to_opc(CPUAVRState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc_w = data[0]; -}