From patchwork Mon Oct 24 13:24:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617870 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2737498pvb; Mon, 24 Oct 2022 06:55:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6bhnBaSkZgYe0vFDiYMdPL/0VWyUEwYZ5lzz/b6XE0xiUCTQL17dEIkd6Ls//J9A6WScXQ X-Received: by 2002:a05:6214:21cc:b0:4b3:eead:ce0f with SMTP id d12-20020a05621421cc00b004b3eeadce0fmr28044033qvh.92.1666619741297; Mon, 24 Oct 2022 06:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666619741; cv=none; d=google.com; s=arc-20160816; b=XzLozGTcmlhu5ClGUiETiklio57kPvxwZI6jRvycrVLiwHs3KUIqwW8nKLxUbAdLaK ukwb5u0vr7V5JXvwPfRL+9OFUCctejOHRLTcJcLghJoLRhZoOwPH7skDEpOJd4H2Vx9h 8M7cxaA6a2YYikTEuLhJpqJDqZmalJITTxdLGvCu8GQT0dHos55SyjXyZEXd+paLSjuE DQ6InNT21zXD0oHrYxSNb9/z19g72LuDwVSI2imyyPpjMhu/rFmY7bB9pj7SogTx9EBF Lqu0yPaGVEsWVRjDYmvqVhEwO1DljVLovNXuwWPG373Jgvx+rKsIkXjjy8AWtUjUrNwl 7YvA== 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=rhfzvh3ALCSlz+RCzVx7zEuLhN6oXhUWc6NZ2cWIDjQ=; b=GBmycA0iLkbqVUTg124n3J44KuIXEKO8n3Y48NH7utvgUVZQxvdXl1QwMn7ojrPRbf jOkvW11FOcyhI5IZILbkqgSFnDLei5S04oHx/1PtJNobq2TsKwhJBHb32SyM9IYIA3LM p9gmgch72jEK041u/II7+QPWHavxH+uWmHacgU2pJm6K1vKC+NOAuhhZPAo+mPSvMI/C xuqRxmSEFFH9D7lZ6+6/ee+VZR/gSQuTUpcXDjkQSBgMJGSPtGuIKIr8vpcxFo47WXkR eZrSc9n46SNsBmB45U5YDoZXblbraGWTzH5WJ7rxGseUnFCW7qwVEeDB3sJmN7fdm+4f ghOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FGvGCQ4G; 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 fv19-20020a05622a4a1300b0039cde8c0c93si15436962qtb.367.2022.10.24.06.55.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Oct 2022 06:55: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=FGvGCQ4G; 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 1omxTG-0003cb-KJ; Mon, 24 Oct 2022 09:26:26 -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 1omxT1-0003S8-Qz for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:13 -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 1omxSy-0004AB-Gf for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:10 -0400 Received: by mail-pg1-x532.google.com with SMTP id q1so8658561pgl.11 for ; Mon, 24 Oct 2022 06:26:08 -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=rhfzvh3ALCSlz+RCzVx7zEuLhN6oXhUWc6NZ2cWIDjQ=; b=FGvGCQ4G2pK3PSHC+2XMSiXQ8XHaWbM/wUjf/g1zG55FhU7cGx3xpH/zkVWZWJ8j4U MKgKJaCzv6Hy54JzSQvZD2C03Pmim2AGXIKi7v/jPEAd+uYrXcvEi+C1fpSfqg8F9BIF D1faWHghyUt71lLIvQPEHCgEZmz+ZZTogO0Ezjkh3UkCkODx43CsUzkBmaa0mJ4eFicZ z2bCwB6cQnIqtSmH/muEnDFLUlXrdDtoCvQcaoL+vC2TLIQh5bw7rnW48bVsgyY+yt+G c1X8IS79bZSGSouPllmJ+Hu1jIOWKgyaKluSoLlU3EgMj2+sPEfsn3bx4kff9JvHh5cI WogQ== 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=rhfzvh3ALCSlz+RCzVx7zEuLhN6oXhUWc6NZ2cWIDjQ=; b=jdYk6PVwLW9nr0APjlbRO/uzP+ZchRts8RFS7iQM/2KGvbjdptjgnOXnrWFPxEHvxR XxcfQzLvm3ByO5sD6+vz+zN4LJglebf2Js01b33/8niXwSs7GUCwqzcG6t1tSMitT1pv 8urHe0+a9PMG/VI5/DOFKDeF84fedgOMlsgZiXgnranLr26JgTQu/IkeinlHn2cIcpBG SqIBukuIDPV9psD6fmR+iqi1Si5I8a+laLPYNNMArmwBenzfjhyoxUsf+6M+xpnbIce2 B1VXWoMKA7J3U/qzXI0D3z/ZyHWe5TeeMCHZrvWXODlSxM82RwrW1E+PYUZTinQgvPee h4iQ== X-Gm-Message-State: ACrzQf2gjo+EM3cYhUCvyyK/Fm9urQaq2aKFoyfU26+mIecIVKl0+kvi BSmUIkZ6CwvWwrwx4vjU4xOuRhqGV+8Gcg== X-Received: by 2002:a05:6a00:88f:b0:52c:6962:274f with SMTP id q15-20020a056a00088f00b0052c6962274fmr34568565pfj.12.1666617967247; Mon, 24 Oct 2022 06:26:07 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 23/29] accel/tcg: Remove restore_state_to_opc function Date: Mon, 24 Oct 2022 23:24:53 +1000 Message-Id: <20221024132459.3229709-25-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 All targets have been updated. Use the tcg_ops target hook exclusively, which allows the compat code to be removed. Signed-off-by: Richard Henderson Reviewed-by: Claudio Fontana --- include/exec/exec-all.h | 3 --- accel/tcg/translate-all.c | 16 ++-------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index a772e8cbdc..300832bd0b 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -39,9 +39,6 @@ typedef ram_addr_t tb_page_addr_t; #define TB_PAGE_ADDR_FMT RAM_ADDR_FMT #endif -void restore_state_to_opc(CPUArchState *env, TranslationBlock *tb, - target_ulong *data) __attribute__((weak)); - /** * cpu_restore_state: * @cpu: the vCPU state is to be restore to diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 19cd23e9a0..e4386b3198 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -327,7 +327,7 @@ static int encode_search(TranslationBlock *tb, uint8_t *block) static int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, uintptr_t searched_pc, bool reset_icount) { - target_ulong data[TARGET_INSN_START_WORDS]; + uint64_t data[TARGET_INSN_START_WORDS]; uintptr_t host_pc = (uintptr_t)tb->tc.ptr; const uint8_t *p = tb->tc.ptr + tb->tc.size; int i, j, num_insns = tb->icount; @@ -368,19 +368,7 @@ static int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, cpu_neg(cpu)->icount_decr.u16.low += num_insns - i; } - { - const struct TCGCPUOps *ops = cpu->cc->tcg_ops; - __typeof(ops->restore_state_to_opc) restore = ops->restore_state_to_opc; - if (restore) { - uint64_t d64[TARGET_INSN_START_WORDS]; - for (i = 0; i < TARGET_INSN_START_WORDS; ++i) { - d64[i] = data[i]; - } - restore(cpu, tb, d64); - } else { - restore_state_to_opc(cpu->env_ptr, tb, data); - } - } + cpu->cc->tcg_ops->restore_state_to_opc(cpu, tb, data); #ifdef CONFIG_PROFILER qatomic_set(&prof->restore_time,