From patchwork Mon Oct 24 13:24:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617887 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2780712pvb; Mon, 24 Oct 2022 08:03:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM46M3vWYN18DitYqwW3WtkBhDk0mPR/h5Eq80O3uZnjaYiyyQeNL1RSN0fgCBP1qNV4fRzq X-Received: by 2002:a05:6512:33d4:b0:4a2:568b:9956 with SMTP id d20-20020a05651233d400b004a2568b9956mr11972240lfg.178.1666623821683; Mon, 24 Oct 2022 08:03:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666623821; cv=none; d=google.com; s=arc-20160816; b=urxfkt8KbCKv3Uk/2KX0QGX0Y/Xl8RG2me9ubwCgl/hP2EIl/rZDk+iRUk1WHtfnaG dfVgP7KJDsmbLwpBi3Nmqje1PVGkMCJmTxgkWBoHxb+x9eIQ1cGGjCayMmoswVEPJroh QT1TuOg8No6NfMM0KGYeCSnO3cSwZeBKn58mLbpblrN5VCUFehM77lgeuDH54LtFMqRP q62E0a/ZrKhE0oSoz80aqFS2BhZ3NqKaYCGyZxADGs8EiDSg4fv8175/qfhxZyPiGHQ/ L0L913jtb4V8XhYHMp/F/rwXGQByvOJEP+kCcDDYAtUfZYGbbr7fZuNuDnz4ud/1PGgO E4Wg== 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=0UCoUPLv3ntqcifgo697/PAVDN0P+KgeFmYU7ktGgGc=; b=pHxvXwsbGeGs9/yhzDFhbjHmXUPtWg8Up3I6+vS5Y/H6SN9RBj0WKq/LvFtZ2u5Imz RlKolUF9VV7xnCjtVJzzFi7nHwbDqn4DVNncJNa0MLmSBb81Z5O2uc526yI/7QK0gX6y 5vrnr9fAjjCI9iU0jRqUEPGjCuoQJSXnG+fyL5wRkwEXMgjV+R4TaBX9MSt5Kyfl4zGE 1h9Tl8P+QV+VP1mZuiLqZYlOiMyRaPZVN50yTffXs+dVkADkOlqqgHee8lCaO5L2EFjZ T+F1TpR9BwAjxDYYqs11B2OeXm0YOZ1LSzRKsav5CcAaFjm1wg7G2aJOQUFdazm5p9l7 iUVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kH18ber5; 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 x1-20020a056512046100b004aa2a80049esi3141430lfd.491.2022.10.24.08.03.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 08:03:41 -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=kH18ber5; 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 1omxSL-0003Ff-Sp; Mon, 24 Oct 2022 09:25:29 -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 1omxSE-0003An-PQ for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:22 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSC-0003t2-9G for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:22 -0400 Received: by mail-pg1-x532.google.com with SMTP id r18so8645268pgr.12 for ; Mon, 24 Oct 2022 06:25:18 -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=0UCoUPLv3ntqcifgo697/PAVDN0P+KgeFmYU7ktGgGc=; b=kH18ber5jNapujDs33qIM90AOMZzxNcHPzhBfNgvan1by2Vf02GTanAZXD9LaS/VXI UgoAIAOWRWcLbtQLl4LtmHtewvsIzq3Kyz14cHPT95dMmueYLor7FGU41QXD+7PraSXB 6IBunH1/j5AR8lmy4pIStq/9bcLA1H1M9s0DWH5fD8IvB+O+45oQTaPZGonJzeyoZ6Cb 4YCgrL1bnAtYJ7V+EP/wy5JH+9e3K9QVEITwyxdgKZ9643dAVgmg2ViO7RmDrkLJuj0N NZPW6g09PxXvUDzzTYhFniRQ/UNa4Z2GJbdGX8P+Yf7HnC/NtsPplWt3ttjRw6jaIAj0 IHlQ== 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=0UCoUPLv3ntqcifgo697/PAVDN0P+KgeFmYU7ktGgGc=; b=nezwHZd/b6/LjGbhJ+nr22epU5SYCv4dJMSVZD768wfKQanFc0tjesfxKqXzqMV3fT maHuljy+CUSUUqvr9eo/B5r19J0YOX/st0JK1IQJTgdS679de9BzYrI4xUpWE905g6+e e/AD833KwvLueDq3VrKXFuCNj/ye6QWCslfzyjVJn60AFuuV20i9hgSF8XID4wCjICZK AhBpsmDuF9upwDnu+5JL5Io9zT56gN57aJd17g4Ehr1HDNiKWSFvZmijmZKKSQ8zZMkp 81GjGDOJTTu80Ic7qPpuP1DBdyKfNGBoF7wQaLvl/fjRP5FuwRIHDfSM3DNFdKeF38vm pb1Q== X-Gm-Message-State: ACrzQf0N2WzGc23z2hNhw9t4o3jGwjDPiof1uKeLL1R1VSRj4G9vW+CQ e2bSyUesNV303ybZiWaAgyJqePhKhGohZw== X-Received: by 2002:a05:6a00:1707:b0:562:e790:dfc3 with SMTP id h7-20020a056a00170700b00562e790dfc3mr33658547pfc.59.1666617916969; Mon, 24 Oct 2022 06:25:16 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 02/29] target/alpha: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:32 +1000 Message-Id: <20221024132459.3229709-4-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::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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/alpha/cpu.c | 9 +++++++++ target/alpha/translate.c | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 979a629d59..270ae787b1 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -40,6 +40,14 @@ static vaddr alpha_cpu_get_pc(CPUState *cs) return cpu->env.pc; } +static void alpha_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + AlphaCPU *cpu = ALPHA_CPU(cs); + + cpu->env.pc = data[0]; +} static bool alpha_cpu_has_work(CPUState *cs) { @@ -226,6 +234,7 @@ static const struct SysemuCPUOps alpha_sysemu_ops = { static const struct TCGCPUOps alpha_tcg_ops = { .initialize = alpha_translate_init, + .restore_state_to_opc = alpha_restore_state_to_opc, #ifdef CONFIG_USER_ONLY .record_sigsegv = alpha_cpu_record_sigsegv, diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 6766350f56..f9bcdeb717 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -3049,9 +3049,3 @@ void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_insns, DisasContext dc; translator_loop(cpu, tb, max_insns, pc, host_pc, &alpha_tr_ops, &dc.base); } - -void restore_state_to_opc(CPUAlphaState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc = data[0]; -}