From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666619861; cv=none; d=zohomail.com; s=zohoarc; b=NclqaLj4jHElGrLPOGMyjxkRvgqrsakqv2Fm3E5YYTdYyJ82X2pEgKn0DstvVhpnQMouHqrKTjLj2cO4IgDnUCMDtARmv6JTplixm6gq5pKeLYQSGoAMiwZxQ+ysfwUQSBvwEOSiGvm4It2hBW21ze+4jLJX1GJUIkEZrx7vmuQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666619861; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7hCgNQMpOajbfDDqbMwdSH+6jBKQutGWCbpGwjxiCrc=; b=X9iQNnnRwedEJk1fOTUltlU/H8gbNbxsvcCf0IjfvNglAZu7Hjb3G6fSVYhJrbAVBruiwYDAXkW1XKDvNHOrwk7lKR18RarX1hMm+LmUQ2W5ghiM6vyUuu1vso7PtM7ROatFYph3/GcW9YJtMsCuTpOAHTV6wxMu1zKLulky/vQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666619861050137.7849331730083; Mon, 24 Oct 2022 06:57:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSR-0003Gs-Oa; Mon, 24 Oct 2022 09:25:35 -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 1omxSK-0003FK-5X for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:28 -0400 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSG-0003x6-Ji for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:27 -0400 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-13b103a3e5dso11838394fac.2 for ; Mon, 24 Oct 2022 06:25:23 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:11 -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=7hCgNQMpOajbfDDqbMwdSH+6jBKQutGWCbpGwjxiCrc=; b=DQCAEQB4oD2ss2MfDt/18sj2dPTsvmBXZG6nyCQ70XO9N/pP4gA+gx0X6dFG9DQIkQ NLrRH+S7daPY2yeLCIE4He/TdLg3w5qg40q5f4rpTiHPumxXsGZtffSXIj7+woweY41F kvuXEnq+yRGT/P5vDScEQAopcDxIl7d6wLeuvDHlcQElWJP7T7uBgVnh0JoKbgtWNkMh 4PPnR+RnfTad6ptc/1ObI+//9q0W2aMf2dJXFPtDhtD9SWncKL5+n4GcNIPLce8XmpBG JjCTsQhRiGYSZ1J8pa6Q/ARyQUr8Moq2CrQaXXLXQC2+m3yra7Tw1Fs+h/cR2k7P8GOY W2eA== 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=7hCgNQMpOajbfDDqbMwdSH+6jBKQutGWCbpGwjxiCrc=; b=ndYuOgrbXdlbLWZECQjc3j58s/Y+adxWQB4n7vmfuWT2HFVlbJqo/PM7h2V1SGA37P IshW/OvTp+oIyNGFXUC9s4QB21iv6VoY4tlJ0y9mZFATSy8yPBW1eWnxN0yTh46H+RZc xfZ/VMRzEiRYYrjkXdvDgtCXOagIjZuHPf4L0GLRAN4mVz0JvXP5aoX4SQ8tPey6XgMJ rwY/6JWHX8Eh7tLjvL81bwJ7aQtuoWdEcBudnl1g7yERf9dCs2+M+Ht6B0nE1HGWb2Pn ORQNszSG+q6b6YxSBEJpCp3eRuivJpwubHIBOxoAOB977llnsJhKIqi1kykDB84Y8pc6 kyFg== X-Gm-Message-State: ACrzQf0L+9RXQoFjHVZvQqWIfPy9HMkjJ2zQ7AWG6dfCeLFYu6UYQHEz on7D2qQm4WXn4agK3uOrpqQ13yRPixXsnQ== X-Google-Smtp-Source: AMsMyM5FBFGdKXAxDaOQdFYfJPTYq0EV6XNdXmrz5FxuK/8ZE/u7RCZH+lYtd6nOuEvMHZsP4dRmuQ== X-Received: by 2002:a17:90b:3a8b:b0:20d:b254:e30e with SMTP id om11-20020a17090b3a8b00b0020db254e30emr38796571pjb.206.1666617911987; Mon, 24 Oct 2022 06:25:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 01/29] accel/tcg: Add restore_state_to_opc to TCGCPUOps Date: Mon, 24 Oct 2022 23:24:30 +1000 Message-Id: <20221024132459.3229709-2-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:4860:4864:20::36; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x36.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666619861868100001 Content-Type: text/plain; charset="utf-8" Add a tcg_ops hook to replace the restore_state_to_opc function call. Because these generic hooks cannot depend on target-specific types, temporarily, copy the current target_ulong data[] into uint64_t d64[]. Signed-off-by: Richard Henderson Reviewed-by: Claudio Fontana --- include/exec/exec-all.h | 2 +- include/hw/core/tcg-cpu-ops.h | 11 +++++++++++ accel/tcg/translate-all.c | 24 ++++++++++++++++++++++-- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index e5f8b224a5..a772e8cbdc 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -40,7 +40,7 @@ typedef ram_addr_t tb_page_addr_t; #endif =20 void restore_state_to_opc(CPUArchState *env, TranslationBlock *tb, - target_ulong *data); + target_ulong *data) __attribute__((weak)); =20 /** * cpu_restore_state: diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h index 78c6c6635d..20e3c0ffbb 100644 --- a/include/hw/core/tcg-cpu-ops.h +++ b/include/hw/core/tcg-cpu-ops.h @@ -31,6 +31,17 @@ struct TCGCPUOps { * function to restore all the state, and register it here. */ void (*synchronize_from_tb)(CPUState *cpu, const TranslationBlock *tb); + /** + * @restore_state_to_opc: Synchronize state from INDEX_op_start_insn + * + * This is called when we unwind state in the middle of a TB, + * usually before raising an exception. Set all part of the CPU + * state which are tracked insn-by-insn in the target-specific + * arguments to start_insn, passed as @data. + */ + void (*restore_state_to_opc)(CPUState *cpu, const TranslationBlock *tb, + const uint64_t *data); + /** @cpu_exec_enter: Callback for cpu_exec preparation */ void (*cpu_exec_enter)(CPUState *cpu); /** @cpu_exec_exit: Callback for cpu_exec cleanup */ diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 4ed75a13e1..19cd23e9a0 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -329,7 +329,6 @@ static int cpu_restore_state_from_tb(CPUState *cpu, Tra= nslationBlock *tb, { target_ulong data[TARGET_INSN_START_WORDS]; uintptr_t host_pc =3D (uintptr_t)tb->tc.ptr; - CPUArchState *env =3D cpu->env_ptr; const uint8_t *p =3D tb->tc.ptr + tb->tc.size; int i, j, num_insns =3D tb->icount; #ifdef CONFIG_PROFILER @@ -368,7 +367,20 @@ static int cpu_restore_state_from_tb(CPUState *cpu, Tr= anslationBlock *tb, and shift if to the number of actually executed instructions */ cpu_neg(cpu)->icount_decr.u16.low +=3D num_insns - i; } - restore_state_to_opc(env, tb, data); + + { + const struct TCGCPUOps *ops =3D cpu->cc->tcg_ops; + __typeof(ops->restore_state_to_opc) restore =3D ops->restore_state= _to_opc; + if (restore) { + uint64_t d64[TARGET_INSN_START_WORDS]; + for (i =3D 0; i < TARGET_INSN_START_WORDS; ++i) { + d64[i] =3D data[i]; + } + restore(cpu, tb, d64); + } else { + restore_state_to_opc(cpu->env_ptr, tb, data); + } + } =20 #ifdef CONFIG_PROFILER qatomic_set(&prof->restore_time, @@ -380,6 +392,14 @@ static int cpu_restore_state_from_tb(CPUState *cpu, Tr= anslationBlock *tb, =20 bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc, bool will_exit) { + /* + * The pc update associated with restore without exit will + * break the relative pc adjustments performed by TARGET_TB_PCREL. + */ + if (TARGET_TB_PCREL) { + assert(will_exit); + } + /* * The host_pc has to be in the rx region of the code buffer. * If it is not we will not be able to resolve it here. --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666623821; cv=none; d=zohomail.com; s=zohoarc; b=jUdMJuPSADx4rfCF3Us0ZrTB8sfmJ2NS/pjNL7tY96nhEOx3K2L0KTrNtrvNZgi+rVXLtSX25SXxi6PsBA9Llv6f/NUitdOLGNNEmLlvZ6SrGT8ohEDOz2CdODso1YRAQL0ufPHm51Wa/3JdbNpFK69oxGecdMQaLqRjwlv0KFk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666623821; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0UCoUPLv3ntqcifgo697/PAVDN0P+KgeFmYU7ktGgGc=; b=AG/89Jczk9TSHq18JATnC6bIplzbPBmcackOEC9uGZk6xMi0w0iXhdJYKKwyuBzsJIHvqI7fagov6xH4NjaCY4eIFQfCOzmPXW6BAiQu4Qcw/Wb+ELKgdgpfbyDn6471lZqARyQMBMEkjjOZ7F/TgGiZsek4hOb7cYKS1C8QuWw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16666238213011005.1342398270626; Mon, 24 Oct 2022 08:03:41 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AMsMyM4qscdCXlUIB5tufygm8JuDcGlcLvMlgJCTEjthcqb4H8denSusMMChVcQOugvxgRpMK4HHLw== 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) 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666623822639100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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; } =20 +static void alpha_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + AlphaCPU *cpu =3D ALPHA_CPU(cs); + + cpu->env.pc =3D data[0]; +} =20 static bool alpha_cpu_has_work(CPUState *cs) { @@ -226,6 +234,7 @@ static const struct SysemuCPUOps alpha_sysemu_ops =3D { =20 static const struct TCGCPUOps alpha_tcg_ops =3D { .initialize =3D alpha_translate_init, + .restore_state_to_opc =3D alpha_restore_state_to_opc, =20 #ifdef CONFIG_USER_ONLY .record_sigsegv =3D 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, Translation= Block *tb, int max_insns, DisasContext dc; translator_loop(cpu, tb, max_insns, pc, host_pc, &alpha_tr_ops, &dc.ba= se); } - -void restore_state_to_opc(CPUAlphaState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc =3D data[0]; -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666620890; cv=none; d=zohomail.com; s=zohoarc; b=HtGM5WZ+eFDxF5uoWk0oWBoIkBEcZJeVo0B+SX+2Q82NS7TZFkDgGeJ3RUqxlY3Y6zBTk7gmVCJXAsUs510FzSo3m8iSjkY/sITe3z67DPQsYmgIeO1XxReD4NDEKIFgJDGO7/uSBjCINH7n/5/3BP176a40jkN5CYOBkRv3YyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620890; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FZc9mr+Lj/5v+/f/s9nBwTEyh4pQeC09vzywJopn5pg=; b=Zt3nETCdH8bUstJYLz0fGDXcmEyFHPi6A0WWwZNL0Nv1knbmbHAAlUWeAXilCsj6Whutdr36OgXstS2CHubMqRHUoiN6HwARmOQPzSE9g5EVKKZbCTdJWjaHsFGHwON1U68b1K7FUQXdClD34fWQ/jkbtye8qDjahX7zwdcBXZQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666620890549287.0202473457905; Mon, 24 Oct 2022 07:14:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSK-0003FI-60; Mon, 24 Oct 2022 09:25:28 -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 1omxSH-0003Cz-3U for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:25 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSD-0003tv-Rp for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:23 -0400 Received: by mail-pl1-x62b.google.com with SMTP id u6so8408504plq.12 for ; Mon, 24 Oct 2022 06:25:20 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:19 -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=FZc9mr+Lj/5v+/f/s9nBwTEyh4pQeC09vzywJopn5pg=; b=bzq+lTPhnonF8y1A5z0S/iaWskTTjwoelDSoVgOvk3fPddVSF3CfYmDIw0x8n42zDD cpPhp/g9MVj3QhOu1qer09JHsh/UhYA7OyaAH/TRUEp6WabOpHa6wtUDFUgQw1/TRS6x onF8JlLOUtpUwgDQop95o1jSQeo/Hb2Hln+PgguyENlW6fAXcWy3AWYtB4hYTRuzhnXr hbvUb3c/ESvNYTqeLNqzdIGBHTK1JdqW7wYG7sTFKk1Pm2R35HOu/AzfDFcaOs/pffAc RZDHokDFS4C6WrIvltN3ZE3D1IHcuH8sgpdzR+0tIWOPoENwHCqhhUxZytc2a+uITmw2 /RIw== 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=FZc9mr+Lj/5v+/f/s9nBwTEyh4pQeC09vzywJopn5pg=; b=OhJeM5KqjtrTix+dNVGTESCXShcXRp8rWNBoWVE36679Rr1SYRcYF08sc/rloTqOVi wNZDIw4vvPP/fDjTsoIb718k8sJAu7k33oNPlHORZ/oPYPwK/qI9/3uV1VI3RuAIdQtH IkiHYgon7KgDJlaJrQCa5YZbBdMKCmcbKxt3HfzABF4ioVUNz6dU5XO90exw/TwzRVZm P0iLV/MQKxgRtmgiAmXJQ+SJ9o/z6g/+ZwOApUvibdKAeKfInUm55ReUZv7JemJSdhXs RI4p0IDuRALgG9fE2MleNsYVb8IjeCs2Y4GHgh3WNHinIwlXicTv/wkB9nmRolBND7CN sUKA== X-Gm-Message-State: ACrzQf3xrtezeZqxDVEj75SDt/zsGJmgRoOfXs1GiH3sVR5BgmKi5T31 qI9YO01wWJ15LAtCpco1n8IN0YOkQrqYmw== X-Google-Smtp-Source: AMsMyM7UXXpnJWqtQuFQ6oahziuwJChv26LNd5kjW+v40ayJWwJmOIl0iPzy+DubL1ZrShT+eHmMTA== X-Received: by 2002:a17:90b:1e46:b0:20a:f9d8:1ff7 with SMTP id pi6-20020a17090b1e4600b0020af9d81ff7mr75993021pjb.34.1666617919406; Mon, 24 Oct 2022 06:25:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 03/29] target/arm: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:33 +1000 Message-Id: <20221024132459.3229709-5-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666620891710100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/cpu.c | 26 ++++++++++++++++++++++++++ target/arm/translate.c | 22 ---------------------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 0bc5e9b125..0a7bfbf999 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -90,6 +90,31 @@ void arm_cpu_synchronize_from_tb(CPUState *cs, } } } + +static void arm_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + CPUARMState *env =3D cs->env_ptr; + + if (is_a64(env)) { + if (TARGET_TB_PCREL) { + env->pc =3D (env->pc & TARGET_PAGE_MASK) | data[0]; + } else { + env->pc =3D data[0]; + } + env->condexec_bits =3D 0; + env->exception.syndrome =3D data[2] << ARM_INSN_START_WORD2_SHIFT; + } else { + if (TARGET_TB_PCREL) { + env->regs[15] =3D (env->regs[15] & TARGET_PAGE_MASK) | data[0]; + } else { + env->regs[15] =3D data[0]; + } + env->condexec_bits =3D data[1]; + env->exception.syndrome =3D data[2] << ARM_INSN_START_WORD2_SHIFT; + } +} #endif /* CONFIG_TCG */ =20 static bool arm_cpu_has_work(CPUState *cs) @@ -2152,6 +2177,7 @@ static const struct TCGCPUOps arm_tcg_ops =3D { .initialize =3D arm_translate_init, .synchronize_from_tb =3D arm_cpu_synchronize_from_tb, .debug_excp_handler =3D arm_debug_excp_handler, + .restore_state_to_opc =3D arm_restore_state_to_opc, =20 #ifdef CONFIG_USER_ONLY .record_sigsegv =3D arm_cpu_record_sigsegv, diff --git a/target/arm/translate.c b/target/arm/translate.c index d1b868430e..74a903072f 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -9939,25 +9939,3 @@ void gen_intermediate_code(CPUState *cpu, Translatio= nBlock *tb, int max_insns, =20 translator_loop(cpu, tb, max_insns, pc, host_pc, ops, &dc.base); } - -void restore_state_to_opc(CPUARMState *env, TranslationBlock *tb, - target_ulong *data) -{ - if (is_a64(env)) { - if (TARGET_TB_PCREL) { - env->pc =3D (env->pc & TARGET_PAGE_MASK) | data[0]; - } else { - env->pc =3D data[0]; - } - env->condexec_bits =3D 0; - env->exception.syndrome =3D data[2] << ARM_INSN_START_WORD2_SHIFT; - } else { - if (TARGET_TB_PCREL) { - env->regs[15] =3D (env->regs[15] & TARGET_PAGE_MASK) | data[0]; - } else { - env->regs[15] =3D data[0]; - } - env->condexec_bits =3D data[1]; - env->exception.syndrome =3D data[2] << ARM_INSN_START_WORD2_SHIFT; - } -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666619429; cv=none; d=zohomail.com; s=zohoarc; b=Rd6/QpwxCVocMTCAc22QJCR0eaVmvyDFz0PjA4irjNkM9UbvGHyS0SDsWqFZcFQPsDY9hUL1o/Pyhy1naTe2amdk/jT0h+T3eBKv6YAv5VWvt0ktNcPA9vCH/bQ8RM3cc6izeGJo2BddRxTlppIiQ0tkdtENBxFkjba8LZ0HcJ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666619429; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=15gYJVhpNSUrbXoz3qxirZ/UPL1cauzIrIQSIYzfKtc=; b=KwjinaAvPisQKfVZasBZfQZxtAJgUQxfVoErAFsxLV7WHUde6qg0weMwua15q+eYuV80C8apUotzuYHFrPpqfg2yz/dOsSH3nEQnDzuO/yKle+bB7OBJaZow82J7ap2MsbROZ+TLduqJdWStpUWSBk9UgdA14exGUVTSYT/TQk4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666619429344677.8298132314673; Mon, 24 Oct 2022 06:50:29 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AMsMyM4wSd5pvn08dan4yPA3jR9SafmNr1VcRyjljctRfwTY6Ndwlz/dXSqGqjsjyg1FWP7b7RwOUA== 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) 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666619429822100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 =3D tb_pc(tb) / 2; /* internally PC points to words */ } =20 +static void avr_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + AVRCPU *cpu =3D AVR_CPU(cs); + CPUAVRState *env =3D &cpu->env; + + env->pc_w =3D data[0]; +} + static void avr_cpu_reset(DeviceState *ds) { CPUState *cs =3D CPU(ds); @@ -202,6 +212,7 @@ static const struct SysemuCPUOps avr_sysemu_ops =3D { static const struct TCGCPUOps avr_tcg_ops =3D { .initialize =3D avr_cpu_tcg_init, .synchronize_from_tb =3D avr_cpu_synchronize_from_tb, + .restore_state_to_opc =3D avr_restore_state_to_opc, .cpu_exec_interrupt =3D avr_cpu_exec_interrupt, .tlb_fill =3D avr_cpu_tlb_fill, .do_interrupt =3D 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, TranslationB= lock *tb, int max_insns, DisasContext dc =3D { }; 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 =3D data[0]; -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666622265; cv=none; d=zohomail.com; s=zohoarc; b=jAxgls4idiuC1tP8ajIBpFRb6pT4Itd/ljLJLwJanig9BCZTBZ80C8BnISOeTgxjBjhntU2QytDj0Gs6HPXUM7uR2o9THs9fugPr2yPMHNbHiU2k40TadEBiK2g2MdjEEF6XDaZBUnUa0xHncrlFxJ50PXKhUNXYb0BipYMbXKE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666622265; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=g+JyoE/JLPQZeDvC/7V0SYveT535zxxz5m5s4NFje60=; b=d7zSNOChGXL9p4mUwm4eVEmfZlDjalXoW+SvKM6rVpejzFgNN5dZ7oxNlXCcpVh6cqYmt9maRPD/wtokIpZsmlnF4Ar52FOVLxneEiu0GxUGOC8sWUJYBuq7MASm4SuLS0AxHKervyweOeavzJ8rwwAEhpDQ24KF51plD1QEGkE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666622265142641.722841955472; Mon, 24 Oct 2022 07:37:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSS-0003HK-AS; Mon, 24 Oct 2022 09:25:36 -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 1omxSL-0003Fg-T5 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:29 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSI-0003yT-MY for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:29 -0400 Received: by mail-pg1-x530.google.com with SMTP id 78so8646386pgb.13 for ; Mon, 24 Oct 2022 06:25:25 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:24 -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=g+JyoE/JLPQZeDvC/7V0SYveT535zxxz5m5s4NFje60=; b=gtIS7NPX/CH5AArmdQ575TaDrS+TagyeuPxUGjWG9hjSWNnTXg49J2kMntCzXy8T23 YBYueKWt299AwLLQaI80jy5rtkOE/BMSd13r3fALo31VD1sTUf6sN0YjSApnAzjV+C9S Eu0n+fbo1jX9bb3v+ErW72Su1tLVAAuwfxpPGHC6Zz1364bAFYkbog51zQvwBLjH05/X 3iv/SaJJcQ6/EnT1dPhhuHdnQlUX27X+HdT+DemnooLyfbd81C1+4mnZK9u7NDvcy+vZ kJ1COG7CjbIfZlihXuP9oAYuz0Gfm9r+RkpkRPiBr4O+tGJI44wbtiEAF5fSl2s99oVh TrWg== 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=g+JyoE/JLPQZeDvC/7V0SYveT535zxxz5m5s4NFje60=; b=pC+dNsnvJTMHSLTYIjlhJ2zZoNBEPD+W5pe5C/Fv/9ffFXUOpvWOn3r9Lxv7YG3Np7 q2CAweryzGxScnoHUswseRn/sHPSJHP5O8RgXgHLNIF4LZp3hoMH5TQ7SbcFD4BeXWDz Cn/nB5P9Aq+4aZImmaBfPQZIGPdx+luW5nxtUqUmazkAjZqQe6TUqGesVZLSa3LQJQNT h112YY1GrrckeBPk9tnShYwWymCncu4S2s+j01SbWMLlK8c/6KPDvawG8vI1wlO3Ux5V orJWaC43GO+AgdcZJutw3yBtswaW/Tjyz8ZdZQ0I1v6cMR/li7+7/mg1jDDpA7uqNsmr saew== X-Gm-Message-State: ACrzQf0TaNDjYjBpsRXeGFq2QLmlNEDQFVqcEPI3QRWF4CRG5W6s2XsW gJK2u2N9DZgnv8o7cf+yWy4L/lNjmS89IA== X-Google-Smtp-Source: AMsMyM6lhKSbRl4mUMJjwPbaNgF3V3R47MMhT42XscGFLpzTtaNUi6dWlZb3g2+MjjVWYDkpbwo/Fw== X-Received: by 2002:a05:6a00:124e:b0:565:ba3c:58bf with SMTP id u14-20020a056a00124e00b00565ba3c58bfmr33565660pfi.82.1666617924717; Mon, 24 Oct 2022 06:25:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 05/29] target/cris: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:35 +1000 Message-Id: <20221024132459.3229709-7-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666622267196100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/cris/cpu.c | 11 +++++++++++ target/cris/translate.c | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/target/cris/cpu.c b/target/cris/cpu.c index 22f5c70f39..fb05dc6f9a 100644 --- a/target/cris/cpu.c +++ b/target/cris/cpu.c @@ -42,6 +42,15 @@ static vaddr cris_cpu_get_pc(CPUState *cs) return cpu->env.pc; } =20 +static void cris_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + CRISCPU *cpu =3D CRIS_CPU(cs); + + cpu->env.pc =3D data[0]; +} + static bool cris_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI= ); @@ -212,6 +221,7 @@ static const struct SysemuCPUOps cris_sysemu_ops =3D { =20 static const struct TCGCPUOps crisv10_tcg_ops =3D { .initialize =3D cris_initialize_crisv10_tcg, + .restore_state_to_opc =3D cris_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D cris_cpu_tlb_fill, @@ -222,6 +232,7 @@ static const struct TCGCPUOps crisv10_tcg_ops =3D { =20 static const struct TCGCPUOps crisv32_tcg_ops =3D { .initialize =3D cris_initialize_tcg, + .restore_state_to_opc =3D cris_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D cris_cpu_tlb_fill, diff --git a/target/cris/translate.c b/target/cris/translate.c index 73385b0b3c..fbc3fd5865 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -3392,9 +3392,3 @@ void cris_initialize_tcg(void) pregnames_v32[i]); } } - -void restore_state_to_opc(CPUCRISState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc =3D data[0]; -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666621360; cv=none; d=zohomail.com; s=zohoarc; b=SKOri63MBzdk7U1J3NTV5m9PIffNZtXpiudw4XJ67N3P5QE80tUT4aZErxprIj9x4K9eisajJLIAsQJSSIaHhkBjurkPdvDGg10vZbQst5k2uaPUbnxap+QN2eyUestVPWZn47+2qXnw/MVmT3Ntw2m6YHfjDKxqUAahnINaekk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666621360; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=U318AeTBizk8iybf4IKiTJfeP/3EJY4p5aqb59+L12c=; b=dX1ihehxrub5wks7mow2TtvVmnsLYSwO7ZqCtt6RchrpQ4j5zh5vc+3ceoM/eIgHK8StHveta0c8ABQBiwCP/1n88VH+ZvBH5VkiB8eKbvANHxoDZvk+UYNo7NJrfJNnMTHYf6xMQ6eGdnWDGbt2aC2fCein810MFJnQPLZHM7Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666621360344113.39963292459197; Mon, 24 Oct 2022 07:22:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxST-0003HX-3n; Mon, 24 Oct 2022 09:25:37 -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 1omxSM-0003GE-KS for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:30 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSK-0003yq-6Q for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:30 -0400 Received: by mail-pl1-x62b.google.com with SMTP id c24so8420794pls.9 for ; Mon, 24 Oct 2022 06:25:27 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:26 -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=U318AeTBizk8iybf4IKiTJfeP/3EJY4p5aqb59+L12c=; b=D2ikOz5RQm7yrLZdBEt66GoP+FEP+YtuZVXPtofKWYJz5gwZw2TK55eSgs3zbdtXK9 0Lunj3mhL6cXSRa3gcWnUiu0ynjRYrhXt38j7xrhRlUJDSZ+UaxlgWaRkXR8Cp5QFknf dBVZG3nI5+vJu/Vtslrt1D2fu5GcUkykZ+2rZV4vBePLOWMZUHzDQfwV6oqvNC6hOYjX P31FJlz/nmaqpr3rH5JSFHcTe9kh5WmKe13VDlHoRyE58YYBP5U0chLNSyAh25+KgQNg IZyzi1SaCcM4+FDo75t0YLb3X9+2zF/fokxPzQ3WNa/qO8PkF1v2ptJ4c1ydzRVesvrB hWvw== 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=U318AeTBizk8iybf4IKiTJfeP/3EJY4p5aqb59+L12c=; b=Wi3wNGtjgmlTO8boIox4hJYHGU7AUdFonlUAhWmpMjMTWpB+/cTvayafs2smGXkpDx 02ujZR+3+1HnsaTGyjqbFuM6ekLbUcXbPWKyj28o/cAmtiNcVTy5z31u17K1/HAu4y12 pq4afKiODjh1VzwYLNYTCq5i7xOIdtvrS6LpQE05UOkc1JHMz3FOzXsbBgnn1c9DUBd/ KJvhOW9JHYrvRD40pPTV5z67m28IwgCyhcgG8bRI3fRXuK9buy1e40VPHoPIJSL7l5yg AA7GbuJIKl3weOhkuHpaX2jQ9EZIoBvZWd0+vSaNjg9UHiS0hbGzZLqRrxnywkEKXqFc Znpw== X-Gm-Message-State: ACrzQf180Kv8aP/lgzobJhS0zTdpc6F6KZqChzEQmKlJ7iPZ2+wAgGKo /+/z+SqCN7rj7zTY9Syhh0A+SWihDofMRA== X-Google-Smtp-Source: AMsMyM6KNyrk7pbhDBDSfzjNUYawsta39Idn/aV49futNgIFXyUTHSwqBMoHPfS67WdQJqKdKy0deA== X-Received: by 2002:a17:90a:d30c:b0:213:1035:f914 with SMTP id p12-20020a17090ad30c00b002131035f914mr5928436pju.196.1666617926965; Mon, 24 Oct 2022 06:25:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 06/29] target/hexagon: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:36 +1000 Message-Id: <20221024132459.3229709-8-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666621361230100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/hexagon/cpu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index fa6d722555..03221fbdc2 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -271,9 +271,13 @@ static bool hexagon_cpu_has_work(CPUState *cs) return true; } =20 -void restore_state_to_opc(CPUHexagonState *env, TranslationBlock *tb, - target_ulong *data) +static void hexagon_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) { + HexagonCPU *cpu =3D HEXAGON_CPU(cs); + CPUHexagonState *env =3D &cpu->env; + env->gpr[HEX_REG_PC] =3D data[0]; } =20 @@ -327,6 +331,7 @@ static void hexagon_cpu_init(Object *obj) static const struct TCGCPUOps hexagon_tcg_ops =3D { .initialize =3D hexagon_translate_init, .synchronize_from_tb =3D hexagon_cpu_synchronize_from_tb, + .restore_state_to_opc =3D hexagon_restore_state_to_opc, }; =20 static void hexagon_cpu_class_init(ObjectClass *c, void *data) --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666618638; cv=none; d=zohomail.com; s=zohoarc; b=HqYjpZqN9iHyRufAysP3DgVrpnIJ8q5k5glQ/CxUgIlLSnJZV171b36uOvjtjajjUlI78vdmDLZ9SN1piQk45dUkTFd8FruXiMoN0QGCHdVQgQbMSHesw25EKR9WpajQo61TmE3vzAAHWa15WkHTYWoXspuPfGUFpRhHazaRq98= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666618638; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yZmYpKwUK74faGnCAnts/fHysNDsEevWZrFSDUez0+A=; b=fVQBRKpDDaXuBjg9a7ELFyC3ladaknJzN4MN1qz5ksj/rHMo/mX6im2w58jaGgzTjSVJC1x8L2+o2ke9sovCAEJoZ5hzCqK9uySEvDJQXiYLdcEi+La+q0dYi4WUDwISgw1Mwzh7KzbnBQJEPSvNyxwGDgMct3RP/CMAdK73ep4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666618638284914.9408178192922; Mon, 24 Oct 2022 06:37:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSV-0003Hv-7p; Mon, 24 Oct 2022 09:25:39 -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 1omxSN-0003Ga-VW for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:32 -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 1omxSM-0003zB-F5 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:31 -0400 Received: by mail-pj1-x102c.google.com with SMTP id t10-20020a17090a4e4a00b0020af4bcae10so9040243pjl.3 for ; Mon, 24 Oct 2022 06:25:30 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:28 -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=yZmYpKwUK74faGnCAnts/fHysNDsEevWZrFSDUez0+A=; b=KRRgrVPVsJtsUIebPitKsx+n6s/bYDIk7qCi58PwCzSP1gFyX8HCtfuNGVXZgS2hKp PhuCvv4je1BpFS0as7/0aYUvRawqeLQy7MC5N5yXgMITvN4gEo0JD2oouJOEst5C74R+ IaEhgcAlgqTvRFHbgh6ruYkvyAI0mPFbF+sgV55nud1brY4SteY+85A6O5S+QyCsZb5x FrTJ92XhIy3Zgs/OSnyWeE4HY7Ejch5B8wff2GYTHI64wH0wYszwR9xe0sRWCY9+BOEY YkAJkCawA/p/CfUPosWUcOFG2lTSw8V9o14qrcxQZgb7RNMEPbkp7lrpSMhc/zJIsgTk JrZg== 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=yZmYpKwUK74faGnCAnts/fHysNDsEevWZrFSDUez0+A=; b=gIbJOAodKFByvS1bSm/sliUCR4pUdYoV5yATOWqYyrWyXv7Aqf7XKoPHM1ZlyEhuNd EZyzYRbzZeYdfJURkel5MtRBmZI7u6tONvhKl0q3KfE/NS2nMySmJyprbGLaHc1vVhCo 9Q7XUAecuv/lJZT+i/hCtikZx4XwKZLPn/rUI3A2ozwY3+D33l5JiHKJ2xvtpy4MCeT+ Gk90GSMgCpAqTtTP0aIan1VE2cUOg8wCtAYnhTQSFaGq3NTimTQ4VeriurD9P3JEB8WU TFItyBqFtxoYFvQs63ZKhxLDP12p//qYcBO3EdK5xDzimpiMbMd9+r/VRtJTALeqtjGD 48Ig== X-Gm-Message-State: ACrzQf3VFxFXwnEz85n1AmG+vP3RLB9N+t7OPoOLUrtnfHt9JtXzegoE dOJbkthI/6dB2otA2dAsBwnFI63G8gflIw== X-Google-Smtp-Source: AMsMyM56XZBDbK6Q7NuvLAVKGKw7E8eQj9u/K9kUCeebnalSv1wnCi1l8rEcsnxBxsdGXgw6B3vrwg== X-Received: by 2002:a17:902:ebce:b0:186:9905:11bf with SMTP id p14-20020a170902ebce00b00186990511bfmr9323904plg.110.1666617929130; Mon, 24 Oct 2022 06:25:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 07/29] target/hppa: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:37 +1000 Message-Id: <20221024132459.3229709-9-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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, 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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666618639938100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/hppa/cpu.c | 19 +++++++++++++++++++ target/hppa/translate.c | 13 ------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index e677ca09d4..55c190280e 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -68,6 +68,24 @@ static void hppa_cpu_synchronize_from_tb(CPUState *cs, cpu->env.psw_n =3D (tb->flags & PSW_N) !=3D 0; } =20 +static void hppa_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + HPPACPU *cpu =3D HPPA_CPU(cs); + + cpu->env.iaoq_f =3D data[0]; + if (data[1] !=3D (target_ureg)-1) { + cpu->env.iaoq_b =3D data[1]; + } + /* + * Since we were executing the instruction at IAOQ_F, and took some + * sort of action that provoked the cpu_restore_state, we can infer + * that the instruction was not nullified. + */ + cpu->env.psw_n =3D 0; +} + static bool hppa_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI= ); @@ -153,6 +171,7 @@ static const struct SysemuCPUOps hppa_sysemu_ops =3D { static const struct TCGCPUOps hppa_tcg_ops =3D { .initialize =3D hppa_translate_init, .synchronize_from_tb =3D hppa_cpu_synchronize_from_tb, + .restore_state_to_opc =3D hppa_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D hppa_cpu_tlb_fill, diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 8b861957e0..1af77473da 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -4346,16 +4346,3 @@ void gen_intermediate_code(CPUState *cs, Translation= Block *tb, int max_insns, DisasContext ctx; translator_loop(cs, tb, max_insns, pc, host_pc, &hppa_tr_ops, &ctx.bas= e); } - -void restore_state_to_opc(CPUHPPAState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->iaoq_f =3D data[0]; - if (data[1] !=3D (target_ureg)-1) { - env->iaoq_b =3D data[1]; - } - /* Since we were executing the instruction at IAOQ_F, and took some - sort of action that provoked the cpu_restore_state, we can infer - that the instruction was not nullified. */ - env->psw_n =3D 0; -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666622036; cv=none; d=zohomail.com; s=zohoarc; b=gaCU2nSxrTHRBGXTLH7/VlF8j9ip+Ksg7CzI/Il1b+7HRAe/+RXfM0rXs0Y29a+f7fd6JNXKkgDUNcOjFYQZM+mjfdJcVc3sUiY56hRTz+vQDr6dJcKJGV3jRGE7U/4DK8iY6uG2B5DXvKkiGcAujw7n2cAMQ2m+K9ygmMa69k0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666622036; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sLwtp+woNcAwBurs5vXqRRocciat0zxGGrqqGlUOysI=; b=k4dnz2bU5JtUPy+4VlXKhnw6gqD3FgrOwY5f4bKMe6JvTfivxXGOA8uIw3paXQJY5sSXTYyQvqPwaGxXSvCtA1ioA4UegKH5zb9jKRgz74Ty213wNfsiKP4joEbhmrN2h7uIBiX4DSrzs4LbbbPH7Xpik6/aNKwB8R31wquq2lM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666622036472345.01974350386854; Mon, 24 Oct 2022 07:33:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSU-0003Hc-IO; Mon, 24 Oct 2022 09:25:38 -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 1omxSQ-0003Gm-Ch for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:34 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSO-0003zi-QH for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:34 -0400 Received: by mail-pf1-x42d.google.com with SMTP id y13so4397165pfp.7 for ; Mon, 24 Oct 2022 06:25:32 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:31 -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=sLwtp+woNcAwBurs5vXqRRocciat0zxGGrqqGlUOysI=; b=TTeQb2g07AU2XkINHJZheWEh6aXFzPK0YbTRWSqLEpvjdHpsw+Maocxb5KCkv7R015 QNubRC+uT2/cDvbVr5JPddQFs0HqjKggBDwZBoGDyeKeMkrfUMU3FPuloJwVvyZjpHjr IL/RxI0WsaghajHnlrmcUtg0EmJbRMeVcQWvtPD7LMijjWojnsTdWeltSsUNIXlucwcw v+cqvopJp9pkKf2CtJ4S7zN5A7m1U1XNBI+8EaF1lQT6ScrSkGVt/wGIeWIvia2Sq6/r VmCozahhAnaf9IYQOH2f9St+SyBgZULd7IZhbzz2uYvoI/fSfw/qnj1T4wUkzWvQSzf4 iHmQ== 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=sLwtp+woNcAwBurs5vXqRRocciat0zxGGrqqGlUOysI=; b=1dMRJtGuH0zNBSs4CFBptVqtc4sM3UBiAqsv+JnB3A565LTUby+v1+tq2yK/FfCPZB x4OJpwYTO1XxmrGquZjM667ClUk7lrIF/MtflnGn81H27cCwfoj9Z2yVMHL/bSM2tB+T +nLU3yxg0JBChSwkxD0dNkx4dkn3qfShySsztSKpls7oewJR3A3gQxSVDAK52PgFMep7 +CM9wYJdIfcr/C43Rai3HRk77tuVG7Pbe+zcfmphpJNChsO4g/oUc5zhgBYV+nK4YuSW sPewuj9l+MT26+ROu12KFZ++x5iRbB3TMk+a/isi6180ANihqJLai8j6Xeq4+nmlspUg ng6w== X-Gm-Message-State: ACrzQf0jsVmpHZ9LKfxG5BN6O4/ZJDAuKJKMU6V7eANbrq+mgO9BYR26 IGYfoI4HnaQ8zRYdk0O3oUp1Zt9ktgTe5w== X-Google-Smtp-Source: AMsMyM5ZDoOWJlX/bL0DzSkocDHFpA+D8G5kzeNBUB9G8BvWMRSCjS+2e0mcSb7TJIlHWkEnUwaq2w== X-Received: by 2002:a63:8ac2:0:b0:460:6480:8c59 with SMTP id y185-20020a638ac2000000b0046064808c59mr28362624pgd.472.1666617931507; Mon, 24 Oct 2022 06:25:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 08/29] target/i386: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:38 +1000 Message-Id: <20221024132459.3229709-10-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666622038837100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/i386/tcg/tcg-cpu.c | 19 +++++++++++++++++++ target/i386/tcg/translate.c | 15 --------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 828244abe2..79ac5908f7 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -56,6 +56,24 @@ static void x86_cpu_synchronize_from_tb(CPUState *cs, } } =20 +static void x86_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + X86CPU *cpu =3D X86_CPU(cs); + CPUX86State *env =3D &cpu->env; + int cc_op =3D data[1]; + + if (TARGET_TB_PCREL) { + env->eip =3D (env->eip & TARGET_PAGE_MASK) | data[0]; + } else { + env->eip =3D data[0] - tb->cs_base; + } + if (cc_op !=3D CC_OP_DYNAMIC) { + env->cc_op =3D cc_op; + } +} + #ifndef CONFIG_USER_ONLY static bool x86_debug_check_breakpoint(CPUState *cs) { @@ -72,6 +90,7 @@ static bool x86_debug_check_breakpoint(CPUState *cs) static const struct TCGCPUOps x86_tcg_ops =3D { .initialize =3D tcg_x86_init, .synchronize_from_tb =3D x86_cpu_synchronize_from_tb, + .restore_state_to_opc =3D x86_restore_state_to_opc, .cpu_exec_enter =3D x86_cpu_exec_enter, .cpu_exec_exit =3D x86_cpu_exec_exit, #ifdef CONFIG_USER_ONLY diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index e19d5c1c64..c8597e2008 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -7022,18 +7022,3 @@ void gen_intermediate_code(CPUState *cpu, Translatio= nBlock *tb, int max_insns, =20 translator_loop(cpu, tb, max_insns, pc, host_pc, &i386_tr_ops, &dc.bas= e); } - -void restore_state_to_opc(CPUX86State *env, TranslationBlock *tb, - target_ulong *data) -{ - int cc_op =3D data[1]; - - if (TARGET_TB_PCREL) { - env->eip =3D (env->eip & TARGET_PAGE_MASK) | data[0]; - } else { - env->eip =3D data[0] - tb->cs_base; - } - if (cc_op !=3D CC_OP_DYNAMIC) { - env->cc_op =3D cc_op; - } -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666622177; cv=none; d=zohomail.com; s=zohoarc; b=CAPcPts3/xK6gi/xlZnyrFaKDSyby72jKXgn5kBBUQT8ia6xew10IZTKDxQ5xCbn0g1dYEUlcSaJ8Z73WoBTSpCnMLP7Sc9yc2tqM4SYmMEgncVegdOli6Y+bILFwGt8PQKXqhQg3MjhVDWx4UXe2lRWqy3FQoy7snAt4VVPoZs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666622177; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=H/cPsGaUjgmGlP0QyiiNiz2LFpmmITkWidJGp9/RY14=; b=dg1JJkPF55yT71alYwo82mjBzO+PNRdK+jhqstGJrbDXSnfzIl/eZcVinCk+X4T+vhIbZrDSHKy+1HyuFUAmBMOA5lr1SPOpXGqvxH2nQZZFp7zQjHGBzkAYS1I7sRYn1rPDiLhRtvLkx1a2zBmB+cPfn7y3BdFFQcHPrJMlbbg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666622177708460.88894324533055; Mon, 24 Oct 2022 07:36:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSa-0003Iy-5c; Mon, 24 Oct 2022 09:25:44 -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 1omxSU-0003Ha-FL for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:38 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSR-00040A-Tz for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:37 -0400 Received: by mail-pg1-x533.google.com with SMTP id s196so8692244pgs.3 for ; Mon, 24 Oct 2022 06:25:35 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:33 -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=H/cPsGaUjgmGlP0QyiiNiz2LFpmmITkWidJGp9/RY14=; b=fOs+L40VFkQzf1o+GTZhN+/jyoeQgOABqwB4Kqyzt4MyVS88t4A+CuxHMVw65eUT4E agygreCpklIBW6/uNDotP/zhtTIm0ox8bKw9rr3oQT2mmEvfe01e9aQrbuO7Cr4QFbHK r3dXdAskAg05KxNL4+z85wz7TjIT4D550j/f7rzLy0zd4NBp3MaZZmeAjYf96jc/Ujwq XVrVWKyYZgHZ5HrwRSBVViahgopBhiKowRPL9XXZhVGuAVJze9PyyuwNUtnZr4DZ9oqf fHbaNVCbkDJgdDfHPWEt42y7PTdIkOsQjQH72uWtixrsk4g5UOqHyCosfrWuR509RelD oxGg== 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=H/cPsGaUjgmGlP0QyiiNiz2LFpmmITkWidJGp9/RY14=; b=4ANbXzQfWJhvfU0Xc7fLyUOYvQ5DXVvjXencIMmN6SzPNk/9gitlnwLmIjYlDSz+y9 ZJS88m49TJN6dhhIETsFTKNFoHBBrPm6LHmcrsMrzJ+cxfkC1ymIPR8kMtssuvq36Cqk 22lgmkwspY1Yfq8e4ly6644PSQ4r8BPeUKRpMbU26oOW12tDoskXFerPfVz5knoNkXhI HQuFl62AE/y325V3RIhpOFz120+Si9RntpYS6sMp0YSuJDaUUY5p5Y4UIlBs4iqVKvIr wQj3TpsEekSliS8bW9s3dIFp9s/z0INdd1caNKQBfgTat5ZHaSePllEL6cSiUGoEowee KQEA== X-Gm-Message-State: ACrzQf2ILWMD+NXktlyUXeJZDfNMGT7MRIt02NYW/Yro4seW6G9I+NUa LRJXT2Q/hKfFjeXY4cs5y0Z/aF7ArV9xvw== X-Google-Smtp-Source: AMsMyM7fAMpWKYSLeNtysXAh9wQLgXrhQiOZdrtggWiOdsbjIjKmYbLHxqWLLhq6xq1xK//c4LcU/Q== X-Received: by 2002:a05:6a00:1810:b0:56b:f29d:cc8e with SMTP id y16-20020a056a00181000b0056bf29dcc8emr2533779pfa.33.1666617934385; Mon, 24 Oct 2022 06:25:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 09/29] target/loongarch: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:39 +1000 Message-Id: <20221024132459.3229709-11-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x533.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666622178764100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/loongarch/cpu.c | 11 +++++++++++ target/loongarch/translate.c | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 1722ed2a4d..49393d95d8 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -319,6 +319,16 @@ static void loongarch_cpu_synchronize_from_tb(CPUState= *cs, =20 env->pc =3D tb_pc(tb); } + +static void loongarch_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + LoongArchCPU *cpu =3D LOONGARCH_CPU(cs); + CPULoongArchState *env =3D &cpu->env; + + env->pc =3D data[0]; +} #endif /* CONFIG_TCG */ =20 static bool loongarch_cpu_has_work(CPUState *cs) @@ -651,6 +661,7 @@ void loongarch_cpu_dump_state(CPUState *cs, FILE *f, in= t flags) static struct TCGCPUOps loongarch_tcg_ops =3D { .initialize =3D loongarch_translate_init, .synchronize_from_tb =3D loongarch_cpu_synchronize_from_tb, + .restore_state_to_opc =3D loongarch_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D loongarch_cpu_tlb_fill, diff --git a/target/loongarch/translate.c b/target/loongarch/translate.c index 95b37ea180..6091772349 100644 --- a/target/loongarch/translate.c +++ b/target/loongarch/translate.c @@ -272,9 +272,3 @@ void loongarch_translate_init(void) cpu_llval =3D tcg_global_mem_new(cpu_env, offsetof(CPULoongArchState, llval), "llval"); } - -void restore_state_to_opc(CPULoongArchState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc =3D data[0]; -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666626182; cv=none; d=zohomail.com; s=zohoarc; b=Bf6f4bc/Kd2EBW6dU+i+7NqrG0MYATxRVoz8IxWBUyZPa8ZOVJdwpjwjBDYBVrz9AKUq8LakW+e2VuNXPJmqi0qJXeYidRlle3jrq9HaBlA3R2KZXi2kVnpUwfZ919s6x4pYnyFfc7/TS2XSlrGNcQReNPGKVnncusHl7TIqqFk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666626182; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DjUS+tQaX/U5U5rcl8RyljhouuNX2K7mx9ij2CFhI3s=; b=lrVjCB3kgPCXsutzQE4tF7WpTNQbS8O92YKFQZLONk/qKqHI509VpuVlMT1YTweYmcvhLXbGYwv4OBw7o8s4VIWobjIJ1de1xeu8/4W5koqIWsfoDaMwcycbKQBFzN76VbkY2yja3f3B0hv9iJqyCp0VtX5VQZPI6el/oPmCaPQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666626182372236.19831624899132; Mon, 24 Oct 2022 08:43:02 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AMsMyM5OkpazQwZLIdiJ3/sTLthp+YoemZo5XJcD9Ki7ru7nXWs7hX1hesbuFYLWgqrWxKZyvaSzlw== 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) 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666626184418100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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; } =20 +static void m68k_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + M68kCPU *cpu =3D M68K_CPU(cs); + int cc_op =3D data[1]; + + cpu->env.pc =3D data[0]; + if (cc_op !=3D CC_OP_DYNAMIC) { + cpu->env.cc_op =3D 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 =3D { =20 static const struct TCGCPUOps m68k_tcg_ops =3D { .initialize =3D m68k_tcg_init, + .restore_state_to_opc =3D m68k_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D 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 =3D data[1]; - env->pc =3D data[0]; - if (cc_op !=3D CC_OP_DYNAMIC) { - env->cc_op =3D cc_op; - } -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666624244; cv=none; d=zohomail.com; s=zohoarc; b=Yh2jD9uCFaIOqwxFztbw71hNk773ihLjB4/2zIZj12QT43SCxml7We9GABaIGwLaBE+nl6hbbZIZnHDGz4+WhfuqdTOItZrVY4/SQd5ZKZ+QQfyQbSpmb0oiThJu+KMCMAW7H4YKoPyqC8IAJT+k9j9AbFh7vZ/8qlwYfxtykIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666624244; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zkKot/9RwNdoZ5yNziAUJ8ZKlma/qkDODlgfsBLjRko=; b=QtOjhWkezoa93J88zrbFHoQLQE2ZrQEf5qU3rhsnlxRH9eI3yV41vNpLn4ztULO8sUbSl4XcspG4OrhRCpwpT9pF7yABW6N5itTPMGfGeKjXjKlpq1nUgCuOBiCfwz49aXMjW8QNgQ1CQfZDjL5/zV7dz5C7PvZhbJKzXCpG8vc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666624244435385.1987896379693; Mon, 24 Oct 2022 08:10:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSl-0003Pm-J8; Mon, 24 Oct 2022 09:25:55 -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 1omxSY-0003Iw-As for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:44 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSW-00040U-Lo for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:41 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d10so8948000pfh.6 for ; Mon, 24 Oct 2022 06:25:40 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:38 -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=zkKot/9RwNdoZ5yNziAUJ8ZKlma/qkDODlgfsBLjRko=; b=ZX/T4KdqzKFKNJF72qSfQ+VuhX9WtusKk1n9rZ43skMcBAKsUVyMFrOQes0y3KJEyN zJDJyuZJg+cz7ssuD0D4em+pr49ZIru7j/5MjeW1Pa07jjWcq/rM6Hjkkdg8cAfoSUgu LCvUNAvc2pgT2uAKDlyB0Wv+CK4hyksXU2qA0z/FG0jc8qDDL5+0OYjrudHHToeXS/N6 5n3063LDhF7b8j6yoxdKzwfwvUNDto3ahecFBiKtLW4MIvrrx36e7mcpd4U2BozE/TzE a/8gCpeTCTg7Ir+J5VgcC6L8Wm5LoC4+GIOk+uP74ofUOtfYJ6+mIh5BfML8mi3dmD7B kBGw== 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=zkKot/9RwNdoZ5yNziAUJ8ZKlma/qkDODlgfsBLjRko=; b=qCBdnSaY5i1+lDKiA3T9irfcrm0H5t7jKN4IbMySQkFBT0iDvOJK49NGeMw0dyPnP4 RfHRANNk9z80HvnAzbfAXfeXPOc3Lnx98DjoN0Mc80ajnkGKnabw/x0OUcouXODYGH3n pdt06R9Do2WUX40KrpJYLAZOTEPE4N5MDRkkoP4PvQOR/v5lApvkwgqWIoCPqkGkyBXd 2cHELuerxltbVZaMme7TXyU1M9SYvIuyI/7sZmKN340mtHuxdK+OhJdzXoECzQOJUy6Y MsvxT1XR8tAa1yO0mp1slgho50yrizePqYDBDMWwG3oUSVPYnZri5gRNfcoBK0sawCxg KWHw== X-Gm-Message-State: ACrzQf3N6Ke8GITbIWRzW8Ao0Tjhkxqigx8yRMd2UPnRg2iQ23OJ7u6S niTwwGE8vnnB788FoXTy9VLiKqHNwT3KNQ== X-Google-Smtp-Source: AMsMyM6U4KZ7qZ8L+C2VRBVTSOBQu1wy0MU21kUFtslC/xuCt/QfaKwpDzHv2j/cjUgWhV8ynVWqHA== X-Received: by 2002:a63:8449:0:b0:46e:ecba:c46d with SMTP id k70-20020a638449000000b0046eecbac46dmr9045586pgd.310.1666617939335; Mon, 24 Oct 2022 06:25:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 11/29] target/microblaze: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:41 +1000 Message-Id: <20221024132459.3229709-13-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666624246570100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/microblaze/cpu.c | 11 +++++++++++ target/microblaze/translate.c | 7 ------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index c10b8ac029..89e493f3ff 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -100,6 +100,16 @@ static void mb_cpu_synchronize_from_tb(CPUState *cs, cpu->env.iflags =3D tb->flags & IFLAGS_TB_MASK; } =20 +static void mb_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + MicroBlazeCPU *cpu =3D MICROBLAZE_CPU(cs); + + cpu->env.pc =3D data[0]; + cpu->env.iflags =3D data[1]; +} + static bool mb_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI= ); @@ -373,6 +383,7 @@ static const struct SysemuCPUOps mb_sysemu_ops =3D { static const struct TCGCPUOps mb_tcg_ops =3D { .initialize =3D mb_tcg_init, .synchronize_from_tb =3D mb_cpu_synchronize_from_tb, + .restore_state_to_opc =3D mb_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D mb_cpu_tlb_fill, diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index c5546f93aa..974f21eb31 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1946,10 +1946,3 @@ void mb_tcg_init(void) cpu_res_addr =3D tcg_global_mem_new(cpu_env, offsetof(CPUMBState, res_addr), "res_a= ddr"); } - -void restore_state_to_opc(CPUMBState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc =3D data[0]; - env->iflags =3D data[1]; -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666618830; cv=none; d=zohomail.com; s=zohoarc; b=Vl80UExZm1E2n3jDx1DaCDASu+8VXIBh6MPmvu0ST99acOIp8etD5fPAEpjO5WkfR5RyLEdDelbXHJREFhn5ycuyNipG/cBV4Hv2YuoUdOhDvUbd3HGxBCvk5uH0zHz+OMXVXuLRwALvWxT+SFYYpK6FE8W50QoXqic11IUq464= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666618830; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DK4/O2C0sfOBd7+ywuOteLd4t53XP/cXeHPWduy8lpE=; b=CD2vVVNjug3K26OfeETzR1GkkvKCr6PCBTsGGH3+ck04KUQpqe58DiGXiIzozTPhzt7K5HQrZfD1x6MILZAAMiyveDKU84R8wYMAr2DKOOgfNNQtFFIW+7J9HE461aRmJOj9PxJLO/5ZNgGBj8pu3stxOnzeCjTc3KAIK9Gl1O4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666618830445703.5189422176092; Mon, 24 Oct 2022 06:40:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSn-0003QD-CF; Mon, 24 Oct 2022 09:25:57 -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 1omxSa-0003KV-Au for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:44 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSY-0003s1-Dh for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:43 -0400 Received: by mail-pg1-x52a.google.com with SMTP id f9so4280088pgj.2 for ; Mon, 24 Oct 2022 06:25:41 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:41 -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=DK4/O2C0sfOBd7+ywuOteLd4t53XP/cXeHPWduy8lpE=; b=LehLBKiXLtytRYkTP8XMH9jqYNEMeo4DkdKRvP2o6OHM85DFhnKXpi+iMBJd9Vm9j+ YeofwcN5uA5S8rjd84sibxkccNWaYTuc400JzPpU/sJYu/8ChMvlft805yHJjhRint53 1lA5F860G//ervBn9s1AyR+RD8Twhl3eXH4V5fZeN6sQD6mj0yby123bt2XatDkabcOQ zCGF5ugQ3JsdH1m3IGEMjRal2ZLtMpDLjOd843w5gQYJ3u1Hs/Ykw0YKAH/7tspznIvZ 2e7kAkrRdHwvQQWj09REwXIZobJiuEzwiqpwfuLl0d0RpllZT4bxqo4vwxq7yO9dwOrg QWmw== 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=DK4/O2C0sfOBd7+ywuOteLd4t53XP/cXeHPWduy8lpE=; b=pgIui8m2nMauRNyQmVarmRQi7hxbozFy/hmrYVCudn9uK1RTg4P4g1hUrZxShJQjIw 9s2IMjSwHTb3LCUXnyGR5MA8HQs5sQZpneNt4DxxVTcRfdaseuHLYJU/AigfTYIXwQM7 gb9ciV9f7iGb4MVTIjgDMhw6C63ivBt7D6pPM2+mx4dFPhvuKwv+bp2D4zufHjyDodo6 AW86ZjKUfI5D7rcSilRQ2KsMgWmg6I3Q9N2uV1pynXZKamhlVZ5d2CLPvgo2MfJ3S3DQ PzjZIokcRbF8lFBR/Fn4ZKmC32h4NktPS08rHoM0jDb5q/R9Z5wNsnCCxXX1TsRyi6XW SUIA== X-Gm-Message-State: ACrzQf1c7WgOCf05j0xffmVILhddRegXUe3utHWzrmV92vs0kM13TAuF zEje8ZQ+27czR0FBIyH+LgFLuLScZuwESg== X-Google-Smtp-Source: AMsMyM7ljtRaoBey3Op9qe4h1wsgqReAl1/XIgCkeIJY0U7I+buVDzFA5me78uSHqEfBDJ/70iv+dg== X-Received: by 2002:a62:1a97:0:b0:562:5587:12d6 with SMTP id a145-20020a621a97000000b00562558712d6mr33008278pfa.37.1666617941583; Mon, 24 Oct 2022 06:25:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 12/29] target/mips: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:42 +1000 Message-Id: <20221024132459.3229709-14-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666618830972100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/tcg-internal.h | 3 +++ target/mips/cpu.c | 1 + target/mips/tcg/translate.c | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/mips/tcg/tcg-internal.h b/target/mips/tcg/tcg-internal.h index 1d27fa2ff9..aef032c48d 100644 --- a/target/mips/tcg/tcg-internal.h +++ b/target/mips/tcg/tcg-internal.h @@ -21,6 +21,9 @@ void mips_cpu_synchronize_from_tb(CPUState *cs, const Tra= nslationBlock *tb); G_NORETURN void mips_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, MMUAccessType access_type, in= t mmu_idx, uintptr_t retaddr); +void mips_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data); =20 const char *mips_exception_name(int32_t exception); =20 diff --git a/target/mips/cpu.c b/target/mips/cpu.c index da58eb8892..e997c1b9cb 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -538,6 +538,7 @@ static const struct SysemuCPUOps mips_sysemu_ops =3D { static const struct TCGCPUOps mips_tcg_ops =3D { .initialize =3D mips_tcg_init, .synchronize_from_tb =3D mips_cpu_synchronize_from_tb, + .restore_state_to_opc =3D mips_restore_state_to_opc, =20 #if !defined(CONFIG_USER_ONLY) .tlb_fill =3D mips_cpu_tlb_fill, diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index c3f92ea652..2f2d707a12 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -16229,9 +16229,13 @@ void mips_tcg_init(void) } } =20 -void restore_state_to_opc(CPUMIPSState *env, TranslationBlock *tb, - target_ulong *data) +void mips_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) { + MIPSCPU *cpu =3D MIPS_CPU(cs); + CPUMIPSState *env =3D &cpu->env; + env->active_tc.PC =3D data[0]; env->hflags &=3D ~MIPS_HFLAG_BMASK; env->hflags |=3D data[1]; --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666619269; cv=none; d=zohomail.com; s=zohoarc; b=F1BH/keeC1UG9apvpqTuuz8+gITuOn4xk7XpjWicq7YPi2W7q2heOEytQa3VLmsmLuIiMp9Lv9GjRNWwZZFpgHAPZgWswHsjfQeu0fyD9liHCnQUkFHoRoeDgzCO9mjEoZVsDtg0nLSv6RRn/RBh0dIjFbWWui3jUw/jaSuxW6c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666619269; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+CkKupTcUlISL2yEb/3shQiouXGSNf8rqXTFn5cdoYg=; b=nq09K8vR79bWc3hlmGm3t+1oWueiZq5esPGc19LVlp4I0BI6MuLuytsLNey96FeRXnXtiXOBptLdFDznc+qOKfCGUCsHMk8ECIMmmhpycPSMbTG2kvCAentcr91880VoUPIh/mB5VoxObG51mRS7qX+9Q3dhN0yQUj6MgqSoR5M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666619269037238.54834230797417; Mon, 24 Oct 2022 06:47:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSx-0003Rt-Vx; Mon, 24 Oct 2022 09:26:09 -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 1omxSd-0003NM-PV for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:47 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSb-00041C-Dp for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:46 -0400 Received: by mail-pg1-x52e.google.com with SMTP id 20so8684908pgc.5 for ; Mon, 24 Oct 2022 06:25:45 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:43 -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=+CkKupTcUlISL2yEb/3shQiouXGSNf8rqXTFn5cdoYg=; b=aukLhvV6t3EeSfe7kxweDUK/Zw/TxVbQJBXIsNJ1J7SJpVAP2n7VRGF2L7x7vjvxXQ 4BUw+1oh9IickIchkEfJ4p5npdknF5XpseU5dp5OTouT+fCaqNW4ESaCsfDMjMcWcUV4 CCtHpL0Nu6E2xq3Gcp2auYQ+TMjrWZ2SJvatoX5hVnTd4faGDd9C8pvWmvVHSeKe9D8j oTa04S5ZXkU0RL7QPbReQkNjGD0MxuzjSLdYSG+gV9cohEyRxw9TwoLQJ9CztXGW3ixD EbPjYJNITbxP8Rdk8Oe7yoCf3zszeIUidbzAK13qGaesp5CRsiyf3q6Uhy/InAufsmP1 VEww== 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=+CkKupTcUlISL2yEb/3shQiouXGSNf8rqXTFn5cdoYg=; b=pa76NNtUXmiFl8l0J79I3ExYMuIp460t5ZGNbP0JVbr80revM+kf5+YpDZHnf8KxAq 5cu+6g1Y1LxxFGmBq644XxesGpZ0rmDaiiDMBFKYNTe8elnyygo2e2DHyrRaaLTWm39t q1XKHgp3dc8n9Zx/CUrmmbG0mSHNyNamgPneDRxJqfvxwXk0kcjyxEBI2vGNKMHpLWuS l1KAg43EN/LG1eavf4Ac/RodGpSc/XLe4cvlhpanmcMLOoNA53WTzvJQut6exYrQh/6f i7NGBLvVPldlQFKBBJjy0jAHaG7CHaXNjMP9qIGyKayTszuE5XvoonoaC0VTb6wtKfK0 67SA== X-Gm-Message-State: ACrzQf0W9MvtWxngrmygIOMskngH+Z+uZHZBFFkjDTlcekPAH4aexgXB qXk5KAhJQFSRoX9iIV6WFm1WC7xvSm4QOg== X-Google-Smtp-Source: AMsMyM5wFWZ7ISiWoTgmAECq+4WT8oQeYuheFX8U/ViPBl/uUH5chIMWxYEDgTjstvJXF3u7hCVVbg== X-Received: by 2002:a63:6b49:0:b0:46a:fcba:308f with SMTP id g70-20020a636b49000000b0046afcba308fmr28494232pgc.8.1666617944049; Mon, 24 Oct 2022 06:25:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 13/29] target/nios2: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:43 +1000 Message-Id: <20221024132459.3229709-15-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666619269540100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/nios2/cpu.c | 11 +++++++++++ target/nios2/translate.c | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index 2b28429c08..9a5351bc81 100644 --- a/target/nios2/cpu.c +++ b/target/nios2/cpu.c @@ -42,6 +42,16 @@ static vaddr nios2_cpu_get_pc(CPUState *cs) return env->pc; } =20 +static void nios2_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + Nios2CPU *cpu =3D NIOS2_CPU(cs); + CPUNios2State *env =3D &cpu->env; + + env->pc =3D data[0]; +} + static bool nios2_cpu_has_work(CPUState *cs) { return cs->interrupt_request & CPU_INTERRUPT_HARD; @@ -346,6 +356,7 @@ static const struct SysemuCPUOps nios2_sysemu_ops =3D { =20 static const struct TCGCPUOps nios2_tcg_ops =3D { .initialize =3D nios2_tcg_init, + .restore_state_to_opc =3D nios2_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D nios2_cpu_tlb_fill, diff --git a/target/nios2/translate.c b/target/nios2/translate.c index 8dc0a32c6c..4db8b47744 100644 --- a/target/nios2/translate.c +++ b/target/nios2/translate.c @@ -1110,9 +1110,3 @@ void nios2_tcg_init(void) cpu_pc =3D tcg_global_mem_new(cpu_env, offsetof(CPUNios2State, pc), "pc"); } - -void restore_state_to_opc(CPUNios2State *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc =3D data[0]; -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666621859; cv=none; d=zohomail.com; s=zohoarc; b=OAk5HKTeTkFpkWOROU2EUECIjibUEU7GOAotPIj6wXOgeWUDfaREifK9MjbWTwxcC+GjIbxsXf5VFZkHbzmFOVBZRIlSWKrZ3uTN2d/EYWa4SQPdHQHrrVgh9Tm7QWidcvnpqrCytUtgl0HqKIT70ncpJUgnmCV+vZsmOxPZPPw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666621859; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=t9KcFtAB+U6fMt8nUgtzl/UbXoLeJjXXCvK7XIkKin8=; b=KsRTA8xwJm7IYNUYhvy3CJNXipEjfqDPRbEz3A07j6TnTN3YVApT+HAoGs28I7jQgv5WZ4SY6kfhU7baTLL92wEgjAu/a0UsFwyGbzJWc32qL5jodzbHugRVa5XeGIr4rjFQq6jbClXjLBYbE6kxBESsTWP7Qk43jgYSxGedbk4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666621859201207.50039322916155; Mon, 24 Oct 2022 07:30:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTB-0003WZ-Gz; Mon, 24 Oct 2022 09:26:21 -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 1omxSj-0003PZ-AW for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:55 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSd-00041P-TH for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:52 -0400 Received: by mail-pj1-x102d.google.com with SMTP id m2so4136827pjr.3 for ; Mon, 24 Oct 2022 06:25:47 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:45 -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=t9KcFtAB+U6fMt8nUgtzl/UbXoLeJjXXCvK7XIkKin8=; b=F4byWkIAQ6NAlCy8JpbmKsYxwq/RQ8SOmJ0aoevOaVK2VGIqp+ox/gUexWrybInDIV qxoHg1ru1ookZNlFEuD7AmHtRQXpKt4litmPa/HxTQC9EiFwl/fGKA9PES1WLeVEODco KEKVH0cQ4InhnRjnk7Tv/c3kMYCz5a+NBsBaMOGpCzScCn43pt21o/66T7V63BvjkQTr eFeUerloY0Rerw8fQVz7AlbdSrothLpb0thKGniBRopNOcEdfrkR1t6XbYhUQaizFlWF CaqxVfmf1TDfU+DGis6Q/Z1nNKu1vmt921spx+P3YOIEVI5Vag41I4UEAayroE89fgEd D3Lg== 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=t9KcFtAB+U6fMt8nUgtzl/UbXoLeJjXXCvK7XIkKin8=; b=n59EPVIgLDdL1eeYJ0ekn6x2m4wcc2+Adu5mdQMDqZ2fVLkQICfeuzpeFkSONNTDDO 3QAo4L/+KjJc+huPbM93XEWaBbAQGMYQUtfXvgRfTFOMcJVZuz9lxbj+b0FUafMlRcy+ 4kTMZq9v+YT/RexAmBKlmEqILGuE7asxoM362TlpogM+zN0xfnGhZXEKcMC+Pk6WDYvv nZdN71J245m2BwGv/P2fzYV/mwzbGCaQvDEzNyZeWgd21HvhoqRCQFnGP4WxV+uFQ2/p mewfFoPrW37WCJKhP/pQywYFEI1ru1y/IwOHhRWwktE38HRFeOB2fOL5dlUpOqEP6MKW GYew== X-Gm-Message-State: ACrzQf14YxvN0uG0NShF/YP7f/AS3d3hIlmO2Rr8T5PCrGRLJkyZ2qvP k4AnRCmjywk+NQdGbIkniuNfq5sw67w/qg== X-Google-Smtp-Source: AMsMyM7ff8PP02xvY20RmoySCLjofRr+gKsHvAU7geBKn661s+Kys49hlgdpeHi9ST6On1uXNB8pBw== X-Received: by 2002:a17:902:cac3:b0:186:6ce4:f94a with SMTP id y3-20020a170902cac300b001866ce4f94amr20707871pld.145.1666617946279; Mon, 24 Oct 2022 06:25:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 14/29] target/openrisc: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:44 +1000 Message-Id: <20221024132459.3229709-16-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666621860014100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/openrisc/cpu.c | 13 +++++++++++++ target/openrisc/translate.c | 10 ---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index f6fd437785..de0176cd20 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -46,6 +46,18 @@ static void openrisc_cpu_synchronize_from_tb(CPUState *c= s, cpu->env.pc =3D tb_pc(tb); } =20 +static void openrisc_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + OpenRISCCPU *cpu =3D OPENRISC_CPU(cs); + + cpu->env.pc =3D data[0]; + cpu->env.dflag =3D data[1] & 1; + if (data[1] & 2) { + cpu->env.ppc =3D cpu->env.pc - 4; + } +} =20 static bool openrisc_cpu_has_work(CPUState *cs) { @@ -203,6 +215,7 @@ static const struct SysemuCPUOps openrisc_sysemu_ops = =3D { static const struct TCGCPUOps openrisc_tcg_ops =3D { .initialize =3D openrisc_translate_init, .synchronize_from_tb =3D openrisc_cpu_synchronize_from_tb, + .restore_state_to_opc =3D openrisc_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D openrisc_cpu_tlb_fill, diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 8154f9d744..2f3d7c5fd1 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -1726,13 +1726,3 @@ void openrisc_cpu_dump_state(CPUState *cs, FILE *f, = int flags) (i % 4) =3D=3D 3 ? '\n' : ' '); } } - -void restore_state_to_opc(CPUOpenRISCState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc =3D data[0]; - env->dflag =3D data[1] & 1; - if (data[1] & 2) { - env->ppc =3D env->pc - 4; - } -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666627328; cv=none; d=zohomail.com; s=zohoarc; b=ewNKDjTr/rLl6MnH9KwoDnUpCVQyhxfH8EmjFsY94/axCMxUoZQ00xyE8PIXlV7DaOjUqZKzhLh+4DzMXov0whk6OCY+S+0YCdtmkz5hOaMTLGnq0ACdJgdc68lZPD79IsEOdySJHMn98MRRTrcL0BW1jpQ9+NigPkqS93XKOis= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666627328; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qyxkF9rav08pAN066OMHtqVcS93bmJM30Eii8isiVIE=; b=ekOGUdkrft67hec5L75FRanaA4CAJwKfRVuRJpo3pcDEl58V8WhGkEjNI73KuE6kIYxApmhtBRJ1T7mu+5ldX8fVw9yjhOzBGHdh3ZLRZoTHWLt47LJivy8G2wQg5EHqN89lr/403tpLITIvS/ojaRG4hX3XUJeqcvyXS5qJIdY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166662732815199.81396881211526; Mon, 24 Oct 2022 09:02:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTF-0003c4-BT; Mon, 24 Oct 2022 09:26:25 -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 1omxSs-0003RD-7k for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:02 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSq-00044I-IC for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:01 -0400 Received: by mail-pf1-x431.google.com with SMTP id g62so4933362pfb.10 for ; 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.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:48 -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=qyxkF9rav08pAN066OMHtqVcS93bmJM30Eii8isiVIE=; b=kxx19Bi3JxnHIkdixfbFVeHn2cjovhsKLGnaDOfrESyGnlT/laelcVDHOSKSDKcfS1 G64bneLc6+ymKdkDimoclafmoSibO7Hjrw76uSC14uHS5PsVF5OwxTyY3HnZ+pS3owQH h/0IUofI+MQKir9KrEUSx8b+fg60Oh6gG1Av81a9RmNC1OWovObwHlaIjFswUQIA3aVS EKCqbnmlvI2isMDA2EFI3ocGIvh7usQHA0aJKWfn3o2HDwvlH3JyVyrOHU/Q4plAxqac vZhQ9StrTf90Xjf8RfFbVSTMVx5/N741Iy7btn9X/w6xAMm8IMboGMWNXu+ko3Fyx438 zvzw== 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=qyxkF9rav08pAN066OMHtqVcS93bmJM30Eii8isiVIE=; b=us43t+FtCk7JerMxxkahFhDIb3MIw3+/nw8rnlqV46NjyncJHAVC47Of1J01/wXBQr AuA3qoum0LU6D9W/+/OIONeyU20GfTK70zHTyXD+xlmvoqGwP3en2stKbIbh+Kowy2Dk ZukL6uQSS8xOf+qX/vWzPUK1S7KKyd99tgAvedRib1D5NRM/1Mt+Zgy3dPk5Y7RSp4y+ eQzdCKzLcS1zJ5RGmvkVYWP+miKfo2Xp/RBV6Q2yLMX5zTaHiC88L1MuFeAolzyMJaD9 WUgfkD+yfmgO01hgwmh+cIRChG7LluUxXs8gW1b8wbh/8DvXjokwKmLSOoIuKIgAeydR LgHQ== X-Gm-Message-State: ACrzQf24Ra4LN/nbDWgUW98jzS+C6YzkCDG2X2wXpeSL2Pcpd3OJZXO6 2ZdaUL42wuNb55LAlx/F9lbSjXpP7BV/VQ== X-Google-Smtp-Source: AMsMyM5F6TgB+m9JMRajWE0IynVR36TShb9lo69M6zLE6lgv8UrGHiYNxIWouamfO7j9o5XgbFENEw== X-Received: by 2002:a05:6a00:238d:b0:563:b212:9257 with SMTP id f13-20020a056a00238d00b00563b2129257mr33370542pfc.21.1666617948828; Mon, 24 Oct 2022 06:25:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 15/29] target/ppc: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:45 +1000 Message-Id: <20221024132459.3229709-17-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666627328703100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/ppc/cpu_init.c | 10 ++++++++++ target/ppc/translate.c | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 763a8431be..335351c226 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7221,6 +7221,15 @@ static vaddr ppc_cpu_get_pc(CPUState *cs) return cpu->env.nip; } =20 +static void ppc_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + PowerPCCPU *cpu =3D POWERPC_CPU(cs); + + cpu->env.nip =3D data[0]; +} + static bool ppc_cpu_has_work(CPUState *cs) { PowerPCCPU *cpu =3D POWERPC_CPU(cs); @@ -7446,6 +7455,7 @@ static const struct SysemuCPUOps ppc_sysemu_ops =3D { =20 static const struct TCGCPUOps ppc_tcg_ops =3D { .initialize =3D ppc_translate_init, + .restore_state_to_opc =3D ppc_restore_state_to_opc, =20 #ifdef CONFIG_USER_ONLY .record_sigsegv =3D ppc_cpu_record_sigsegv, diff --git a/target/ppc/translate.c b/target/ppc/translate.c index e810842925..7228857e23 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -7739,9 +7739,3 @@ void gen_intermediate_code(CPUState *cs, TranslationB= lock *tb, int max_insns, =20 translator_loop(cs, tb, max_insns, pc, host_pc, &ppc_tr_ops, &ctx.base= ); } - -void restore_state_to_opc(CPUPPCState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->nip =3D data[0]; -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666619228; cv=none; d=zohomail.com; s=zohoarc; b=fsBHoSLJF30m1a7uDIJ8ThRnlEl0BecSi7alRZG1Gewph34F3XrK9KlC9I2pTS3IsqAa+ucZpbojAbJisw0yKdLm7zpLEbHBESGw7KqjhzUsMCtyf6bisLkGISR4xz2zfJqEP3/nHjGPjp99YOr0Heiz+eF88SCcRDQAUEX6yOo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666619228; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hAq7XVr/FoKNvSkjmihPbNM5RdHZ4AxVGfIszTkgdp4=; b=Hu2HMNfixhp83yLE6T7vsiyG78PRA21IlsiUv5/11/cizsmY0xM0ypra+ujKpCKzvE6ErPvzYW3ZDhpepVoSyfFHnkcPII16fv+40Z+WpayphC6OStI3Ty5qD5NMjNjZJMTdgUWSE+OE7wynWOQaWE+5mfH+I8QHGMfn49eGHuo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666619227972737.8598953054939; Mon, 24 Oct 2022 06:47:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSt-0003RZ-M2; Mon, 24 Oct 2022 09:26:03 -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 1omxSk-0003Pi-Uj for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:55 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSj-000425-4x for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:54 -0400 Received: by mail-pg1-x52f.google.com with SMTP id h2so2557532pgp.4 for ; Mon, 24 Oct 2022 06:25:52 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:50 -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=hAq7XVr/FoKNvSkjmihPbNM5RdHZ4AxVGfIszTkgdp4=; b=awyywU//kQkzUWfs2hvlFshcfy+d2+0LxwIY1e/vMt1AH5JbmTjyrieMWUsh3EkUTV qSjl85hYbQyPVOjJzMMgs/rPzsTi701J/zwMtH2PiSX9MZLfwFg4dkjFKrpAmFZadt4t 4KRnLm2dmzHwMi3MWZL5ekBaBtvldZz2tFCjv+qGmpxKQqWMUgq/tqAsWEBvPqg5BaET M5+R0gOyAVLrQTIP4WFD8OADcoueMxAp0IfxWG4toEGqe0Mtjtut2hZvWP6lMGJGccNa WGlJvznfcyFltS/gPOn4xyEGyATKURDjCvrbevWC6vCtqIBgN5ilUChIia0RT2byYD7o u4oA== 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=hAq7XVr/FoKNvSkjmihPbNM5RdHZ4AxVGfIszTkgdp4=; b=XXRqFI/tGRxTp42blqT6hVR+83gdrGj+T0dSRHgViM2LiaFr+GtD9DTUKcj1vM0UIp RitNepNeYsiTqCd2NmnRiqVruOMc0Coi7UgleDC6O18k3+E1NjrOgLAtWWFpTC/dJKsK TdF3tW+vZuAPN8LDa//BFA+MPRk9GSNyHDNaTjDL/B6BqotxMLeCa4/zOVhqcyyRmcgS rI8PfxlIp4EnVlZ0odwlS0FvLdcNrRZMDWVN42dNwNwx5rcVHuTziakxLUobr1w+myTK 3de4/27wj5SKumaUmTdSn0+Zb6kFlKZR1A+fj99SDPi9m2DtQQ7BwmqqGzuH0c6wyS5L 3tFA== X-Gm-Message-State: ACrzQf0xe/ePadd1YGbnoOddd54gWQhZ8NLg2pWAn8JyZWJzaKRiDza7 zCATeij8RIJ663H6du6uKXX13o5c2ylIdA== X-Google-Smtp-Source: AMsMyM6HCYmYYM+rJvPWplWLOog9+Dh0c9nuEjY0lrAXiy4DbQp8PHXTW+pagcpgQrAkmVGpqOh72Q== X-Received: by 2002:aa7:888a:0:b0:56b:c5d0:d17f with SMTP id z10-20020aa7888a000000b0056bc5d0d17fmr5935356pfe.25.1666617951381; Mon, 24 Oct 2022 06:25:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 16/29] target/riscv: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:46 +1000 Message-Id: <20221024132459.3229709-18-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666619229302100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/riscv/cpu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index e6d9c706bb..d14e95c9dc 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -503,10 +503,14 @@ static bool riscv_cpu_has_work(CPUState *cs) #endif } =20 -void restore_state_to_opc(CPURISCVState *env, TranslationBlock *tb, - target_ulong *data) +static void riscv_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) { + RISCVCPU *cpu =3D RISCV_CPU(cs); + CPURISCVState *env =3D &cpu->env; RISCVMXL xl =3D FIELD_EX32(tb->flags, TB_FLAGS, XL); + if (xl =3D=3D MXL_RV32) { env->pc =3D (int32_t)data[0]; } else { @@ -1138,6 +1142,7 @@ static const struct SysemuCPUOps riscv_sysemu_ops =3D= { static const struct TCGCPUOps riscv_tcg_ops =3D { .initialize =3D riscv_translate_init, .synchronize_from_tb =3D riscv_cpu_synchronize_from_tb, + .restore_state_to_opc =3D riscv_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D riscv_cpu_tlb_fill, --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666618750; cv=none; d=zohomail.com; s=zohoarc; b=QVlrYPvb3Yu3ZmPhBxpe5YlXd77BKXJyh+iSVpfI/y32n8zlIxOLimKUdPHkjvO8NWA1gV0xxbZeXaPVvuEJnjW6OwZt8oY4S3y/TnybF7kw9q43G8850fxu+HOptHTB7jaLq36npxWzVm4bt1XZkqMmKiYZEfcmTrIdj7kM/Pk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666618750; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JF3XGXjHYNHuxSwtZLkg/V+n2/HF5CeeOxU68TL7GUw=; b=NaB3ax98HXE8yMxQuu6FygXBcqRHUqagPLKy9RdcBt5a1zZa+xC4S3PFUJY55Q9IzxcP+hjRkV5DrXJI0acyYeNDcCJjPB16U2M5zVUxWV7EoRwoI5kEnWsjGL5mBT2uzKQBhzemIpgAaNl/W+LFIl67m5Bmyn1T4xy9B7ViqWg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 166661875093799.34297375656638; Mon, 24 Oct 2022 06:39:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTD-0003Zi-0H; Mon, 24 Oct 2022 09:26:23 -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 1omxSn-0003QF-LR for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:57 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSl-00043O-37 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:57 -0400 Received: by mail-pj1-x102f.google.com with SMTP id l6so4539471pjj.0 for ; Mon, 24 Oct 2022 06:25:54 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:53 -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=JF3XGXjHYNHuxSwtZLkg/V+n2/HF5CeeOxU68TL7GUw=; b=x8R0gHwrSKxTEH/uahxGUSrmxc4Ces3xlJFThmEpckvojCk8KsCZu4vvB3rzyKbq7d fRpYB4V6unIkyBq8NBm1kPzqTYUjsHqFKJsCTvGD49yBetmpVQAWeBTA9LBE1iKQynre DJV08Bp47P9P/i+xiT6/t9QI7+8Ts4Aw+sTylECtGeOW56wr6wMPHuCIlMGCGO7lJQNy JOgGwaYAjkQ8BBGPgcVf2XYRfHj1M7rQ97Mu0VVIO6u25pfFLWbqFFygBIe108Ug60PO I4X5PH9Ouw9RoU4RMonssIJo8H8g/90jwyCgxS1PT9EFMeZgSgyh7ks5cMjP/rXAS1XG 0v0A== 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=JF3XGXjHYNHuxSwtZLkg/V+n2/HF5CeeOxU68TL7GUw=; b=GUlxhF9pN5WEmTW7XGKrbIfQUlirAMiuTjRtL437vLBY8D98S5p2aWfc2hc8zL1On1 b7YmsJP9+Isz8YDcExepNhbAKXJJUYso4gxQU5fchINl2R4WiS87+ThUiAr9fPah7fdH T/sMknyEVC3ueRr6AAVDUzTbx0NfM1B4uZKQ97UwJlZ0G5G/BJPWCX1mL3M6I9nOXTwP txrfDSw4wQGLt5RAg/wxGm9h+WxyKw2YOM7tdmJg6oV5WE7C9JgopWtP5ThM79lksOb+ 5IRp2Q/ArBiq+lrKwS6fVE6u85wqkJr3IgBs0GvP515RMKxxJifX3wGwYFMwthbwqMqj jS9A== X-Gm-Message-State: ACrzQf2bRc6HC8iA+iv3tZ2tLd1FD0zusmN6/aLyeOFQ905wcxtd8SD0 6mL9mK6o/0ZikX4IfVh2l97IJPtbp5uOjg== X-Google-Smtp-Source: AMsMyM426hjXICzyvuDEpOa8DUV3u1nxwnqEEAACQ3xNyNM9WLBbz8j67Qy+I+KclgR/D7bXrVh5bw== X-Received: by 2002:a17:902:d510:b0:185:4b76:6277 with SMTP id b16-20020a170902d51000b001854b766277mr33032817plg.82.1666617953567; Mon, 24 Oct 2022 06:25:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 17/29] target/rx: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:47 +1000 Message-Id: <20221024132459.3229709-19-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102f.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666618752384100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/rx/cpu.c | 10 ++++++++++ target/rx/translate.c | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 2f28099723..9003c6e9fe 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -47,6 +47,15 @@ static void rx_cpu_synchronize_from_tb(CPUState *cs, cpu->env.pc =3D tb_pc(tb); } =20 +static void rx_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + RXCPU *cpu =3D RX_CPU(cs); + + cpu->env.pc =3D data[0]; +} + static bool rx_cpu_has_work(CPUState *cs) { return cs->interrupt_request & @@ -192,6 +201,7 @@ static const struct SysemuCPUOps rx_sysemu_ops =3D { static const struct TCGCPUOps rx_tcg_ops =3D { .initialize =3D rx_translate_init, .synchronize_from_tb =3D rx_cpu_synchronize_from_tb, + .restore_state_to_opc =3D rx_restore_state_to_opc, .tlb_fill =3D rx_cpu_tlb_fill, =20 #ifndef CONFIG_USER_ONLY diff --git a/target/rx/translate.c b/target/rx/translate.c index ea5653bc95..87a3f54adb 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -2371,12 +2371,6 @@ void gen_intermediate_code(CPUState *cs, Translation= Block *tb, int max_insns, translator_loop(cs, tb, max_insns, pc, host_pc, &rx_tr_ops, &dc.base); } =20 -void restore_state_to_opc(CPURXState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc =3D data[0]; -} - #define ALLOC_REGISTER(sym, name) \ cpu_##sym =3D tcg_global_mem_new_i32(cpu_env, \ offsetof(CPURXState, sym), name) --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666620137; cv=none; d=zohomail.com; s=zohoarc; b=XvCHOCsjkMLUOgxuz/Bkap3iBE2z+5nCbAK3VtbcN4OFxYYM0H7nV2xJPtmixDLnPfZ5v4HnpfgYVk/oNrtj42i5NEpm9TzK6b9Zuzt/18QcGIA5Z/4wfKKPJQYug/HZPZW9wQ6ch4XNIJ0uWRRewAdVmpIuYPOy2YunO+GF6p8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620137; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CqMi6AgcSdGr/g7gG0+oR8p7CnhkH9erJLU5T1v9TNs=; b=Pr0onI6J61ngLDRrSXkXC2I4aTbGjMANTR4if1WQHQMfQHSwXZwupjzOIzfo/75/GPmiUnJ19i8C7uZvwHG5KTeR1iMVPaatEYzUul336T85DJx805Jm9toMFKDzG9yk+7mPwx6g5iG3iLJq6ezcsElpYMZOplooHQ8k+4mFnq0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666620137551507.77293955171183; Mon, 24 Oct 2022 07:02:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTC-0003ZR-9n; Mon, 24 Oct 2022 09:26:22 -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 1omxSp-0003QJ-EP for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:59 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSn-00043h-EO for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:59 -0400 Received: by mail-pl1-x633.google.com with SMTP id n7so8454763plp.1 for ; Mon, 24 Oct 2022 06:25:56 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:55 -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=CqMi6AgcSdGr/g7gG0+oR8p7CnhkH9erJLU5T1v9TNs=; b=Z5Sda1i+Uy9aEo+iiYzQpNKQR0Mi0hWTZB3xZTArj/SOq3XBS2uwzo9CVWd/usUz/s J6GTHDKjEBi3nsqYLZmtjxEVm8l4luUhxVISpycPvrSRJUgRdcIw0R7GgrPhOOMxVjYz oG9QhL1g8Ehp8EwP46CeX3fvUnBf1gjS4cjLrA7A5OBKr7c53WWGXhp8zKdqVu7XCIin uOUaWPHFI2Hgl08iLLWVlzZuuM2zq3BYJzSTer5nvsFMN6KqjSFTnmEwrdLSxuASuh+w HQkgGDe2TBKCkIJlhW4QVxtRqCaow3V3fhMuRCFhnG/uE4mjAOdxhSgLY+1njDLny0GJ Hmkg== 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=CqMi6AgcSdGr/g7gG0+oR8p7CnhkH9erJLU5T1v9TNs=; b=X+rUFXh7zgEQGvXZoTOgeC2e9v3EOdU1X5YPIrVi7Yl6S67AW17PfrrfvPBPpHtIDZ wejhYXZCNw1WA8B+Ok6yEqKanVw9lgEkYyxYZoXmr4vwtlrQSOxJNuajUZ7MxEnWmKZh caeqfTk8pJzIgm4MVQ/0okbcJbRx4eOWmlB6OL8SkbLSa023GjZ7OGrNsmN55t5UBgON jV0NYUR49JBQraY8fe+mXgy6E0gk4A/3hwWLORdZ6o2xokorqaNQLGkD47KOw4xfunt1 d+D5E5XJ/jBqElja1Ta0kvuXmsZE8gA1VqMIk6hPMHMNBEgwtASqAYlWWQPYmjRVI270 eRlg== X-Gm-Message-State: ACrzQf2SxZZYIQUZz67u3CKp+iLENK1eO88RY+3ifKN4Uxe2nvWN3Iwc 9IJCUKR4HdGcTzzRIXyGfcz3Eiyx7wW1+g== X-Google-Smtp-Source: AMsMyM4XkfVXHBGMIk0CQUaUHyxm8xyCUMyDsFQcWWFszavRn2vAbCSvBT5oToNOVMvtaslWyQMlvg== X-Received: by 2002:a17:902:e88b:b0:17f:93a4:e31b with SMTP id w11-20020a170902e88b00b0017f93a4e31bmr33936953plg.51.1666617955807; Mon, 24 Oct 2022 06:25:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 18/29] target/s390x: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:48 +1000 Message-Id: <20221024132459.3229709-20-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666620137996100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/s390x-internal.h | 4 +++- target/s390x/cpu.c | 1 + target/s390x/tcg/translate.c | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index b5ae0ae364..5d4361d35b 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -398,7 +398,9 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, u= int64_t r3, =20 /* translate.c */ void s390x_translate_init(void); - +void s390x_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data); =20 /* sigp.c */ int handle_sigp(CPUS390XState *env, uint8_t order, uint64_t r1, uint64_t r= 3); diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index df00040e95..96562c516d 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -272,6 +272,7 @@ static void s390_cpu_reset_full(DeviceState *dev) =20 static const struct TCGCPUOps s390_tcg_ops =3D { .initialize =3D s390x_translate_init, + .restore_state_to_opc =3D s390x_restore_state_to_opc, =20 #ifdef CONFIG_USER_ONLY .record_sigsegv =3D s390_cpu_record_sigsegv, diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 1d2dddab1c..5798928473 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -6691,9 +6691,12 @@ void gen_intermediate_code(CPUState *cs, Translation= Block *tb, int max_insns, translator_loop(cs, tb, max_insns, pc, host_pc, &s390x_tr_ops, &dc.bas= e); } =20 -void restore_state_to_opc(CPUS390XState *env, TranslationBlock *tb, - target_ulong *data) +void s390x_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) { + S390CPU *cpu =3D S390_CPU(cs); + CPUS390XState *env =3D &cpu->env; int cc_op =3D data[1]; =20 env->psw.addr =3D data[0]; --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666618691; cv=none; d=zohomail.com; s=zohoarc; b=GhDRmISVmxi3cXbpaY5org1vN+xXmksUsmAXafyjgHwgQlJUwnQdWwFFQtkV8oG+eaRvEM2f+oth6JP2WaekTTN2OBDTf7pOMEfnu0Uaj+Say+1pgQWcni+RoPLOSi4Llf5kxnC4Ez9PitOnh4dY2jz/czILiXvVFtWBG1VT1rM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666618691; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Zh2RvC3pN/K5VvnXNLzrbwqSruMWEZTNe5V7ylhZCfA=; b=ObPCRarFt0hV0/5YJtz6gW9QlssXGL3ibH0nUj0lxZwM8f/NrGBME14cAqwmRiS1qu0aj8GZPTX4etPpBxaQfKaXqTVLIDzrQCk6IgE3Hz4jUHqPqtYlyb5WKsPjNXCYbyrKiGF+N9UYNQYvjmagyvJZ2QJ0vy3q3wUvK0Vn61c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666618691135494.74599956634836; Mon, 24 Oct 2022 06:38:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTI-0003cr-1a; Mon, 24 Oct 2022 09:26:28 -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-0003W3-OD for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:21 -0400 Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSz-0004AS-Qm for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:12 -0400 Received: by mail-vs1-xe35.google.com with SMTP id k67so7833759vsk.2 for ; Mon, 24 Oct 2022 06:26:09 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:57 -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=Zh2RvC3pN/K5VvnXNLzrbwqSruMWEZTNe5V7ylhZCfA=; b=Beqi774qZzUQiK0e6RUzqLjtXdnyYMQx8ZzYL8pA2MvHsVacM0WMaJPDnnJA2a9Mgk OJ3L22R8ls4+llK2mqDXIA6kUHKFVsxEyvnxIU772LLwGLQgTJTprTgjydFgO4yOXXSp ImVnT1AwLeB8zus5185jAekPhUr/eJ3W0WjGxrM4LZspMuICGrbh3oF7DbTuoa8RkKyJ xg3XbR22IgRNqmNJArbUudMnoge1U0CiukiA2uSYIpgGQanRNj25py7kRCaFOx/f/sMF TGIVA05lMoattGd1DLYsVKdrnBWNh6F0usdY7+1WIyAxC/EmT19XE744p5++2BJatLnA 8ejA== 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=Zh2RvC3pN/K5VvnXNLzrbwqSruMWEZTNe5V7ylhZCfA=; b=QjUZw2TYxzBr00R6ZuCg5a7Y2EGmuv2W6pk+YDFxCDChfn4luIj27dzHCAZskUSzbN Tea3ptwdHWpBmUV3BDRp/XAR8f6LjpAaBUi08qQjnCgP1EFsi2oqe1SeK10if8bV7tn9 hyeQ5VN9y8Jbu3RGL6KoyvRmlrfMINgmXZy7Pyk8/OO0knLvUcqcP7rTEzKSUlSeUCOI aciJaltc0SAiwoE7pBx0yjflemcATMazWYoIcX7elO1S5hEf7EqdgxkOyTwIKgeh1L8b m+9dAg8mbAcQky2Ajwdn/gkVj9EOYEvfAT7BgAqNhbwnzMX2e/XSIdLKhG2qFTfDpa6n FowQ== X-Gm-Message-State: ACrzQf27+0U5jCewn2SSTzRGWbhpST+hJgpSRsmWzzMcm6m5FgGVi/WX RTS4LqHdr0iadmPn7P3piyzBLcn+jLk9cA== X-Google-Smtp-Source: AMsMyM7cEUUOa2UjHDAGO+uKsQJ9/WWAKHd830HN5E6S3sdDZ1U+z2371i4gb+elMrcC6H0h3FIzlQ== X-Received: by 2002:a17:902:e952:b0:17c:7aaa:c679 with SMTP id b18-20020a170902e95200b0017c7aaac679mr33695010pll.74.1666617958020; Mon, 24 Oct 2022 06:25:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 19/29] target/sh4: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:49 +1000 Message-Id: <20221024132459.3229709-21-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::e35; envelope-from=richard.henderson@linaro.org; helo=mail-vs1-xe35.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666618692250100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/sh4/cpu.c | 16 ++++++++++++++++ target/sh4/translate.c | 10 ---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 56c50530da..453268392b 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -50,6 +50,21 @@ static void superh_cpu_synchronize_from_tb(CPUState *cs, cpu->env.flags =3D tb->flags; } =20 +static void superh_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + SuperHCPU *cpu =3D SUPERH_CPU(cs); + + cpu->env.pc =3D data[0]; + cpu->env.flags =3D data[1]; + /* + * Theoretically delayed_pc should also be restored. In practice the + * branch instruction is re-executed after exception, so the delayed + * branch target will be recomputed. + */ +} + #ifndef CONFIG_USER_ONLY static bool superh_io_recompile_replay_branch(CPUState *cs, const TranslationBlock *tb) @@ -243,6 +258,7 @@ static const struct SysemuCPUOps sh4_sysemu_ops =3D { static const struct TCGCPUOps superh_tcg_ops =3D { .initialize =3D sh4_translate_init, .synchronize_from_tb =3D superh_cpu_synchronize_from_tb, + .restore_state_to_opc =3D superh_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D superh_cpu_tlb_fill, diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 26231b2a5a..7db3468b01 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -2381,13 +2381,3 @@ void gen_intermediate_code(CPUState *cs, Translation= Block *tb, int max_insns, =20 translator_loop(cs, tb, max_insns, pc, host_pc, &sh4_tr_ops, &ctx.base= ); } - -void restore_state_to_opc(CPUSH4State *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc =3D data[0]; - env->flags =3D data[1]; - /* Theoretically delayed_pc should also be restored. In practice the - branch instruction is re-executed after exception, so the delayed - branch target will be recomputed. */ -} --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666620332; cv=none; d=zohomail.com; s=zohoarc; b=Lwn5ju2bpcjk+yOA57YmgI5Qs8cRd6Tk7wnwQ1yfjA7fRoAGGptxyfQxebxFgsE8jQf6D6+WNmrsztoTen/vgloJMnwwGbygh1dE72ukNr3uCtVDaP4eV8ac+R/PxGJPCiOYWLfgiyVyVfz/76bsj4tbGP0wLuqb5lPckqSv6aY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620332; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cY7FAyxwYmVho+YuvFv5lJrrcsTnuKViFvoEAlMwTHQ=; b=g0kr1NWn1/EMLh6qrAA4mAIcM9WxNk5qZiua1FtRLZn6KeNc3/ROY55mXW4HF2KEhNsS8kb7/liIdr3EgKfruDFx429VvxUQS1FgHStvBG7pX3rPECQ2zm6i6tSKeib5GdLZ+lfPhYBRsRF4LHg3r+fEN9ILZp+fLKnNC4aARcQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666620332294522.7211064288181; Mon, 24 Oct 2022 07:05:32 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AMsMyM4qQww3Fsk+HsXRNz1tG7x0f+kiTDNNkRpKRxXQk0lJazrmP0FRUCDmLirOBfidiIAaxOY3lg== 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) 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666620333678100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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, =20 /* translate.c */ void sparc_tcg_init(void); +void sparc_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data); =20 /* cpu-exec.c */ =20 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 =3D { static const struct TCGCPUOps sparc_tcg_ops =3D { .initialize =3D sparc_tcg_init, .synchronize_from_tb =3D sparc_cpu_synchronize_from_tb, + .restore_state_to_opc =3D sparc_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D 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) } } =20 -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 =3D SPARC_CPU(cs); + CPUSPARCState *env =3D &cpu->env; target_ulong pc =3D data[0]; target_ulong npc =3D data[1]; =20 --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666619861; cv=none; d=zohomail.com; s=zohoarc; b=db77FBxHnHbI/nm8aD2YfKEG7P5fu0ytUzPIjgl1J4slvch4neec6hnbVSOpAjm9nW4lG2k8uSKVqxWp1O2fb/Z1TfwYj8so/VGZWl5eYJZLmp5WYk6i7imEHD2gT98Uxn7TRvFrsjjSt/4dwj9ZV6YG2LQvdqPnbpn7kIJMiO4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666619861; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Bd4nOs5cndwUPUkE6wb4N+9NYguPemV5ztELXhebcaM=; b=lYCidDZpg+tZWDCydY6eA2xulnD2rKAS771L07cDm2Su+Y6ntmHu68gWAgZe+s2yjCUXYIjiU9JSx2cEPfx3xpCOXjRLhGfBsrT5VyQxmIOjV1SzD2sDSda3TMnD9Ran70TQd1vJlCJZH06dnlK6ukvXVzvi5tm3hfERze+V1i4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666619861648570.600270634207; Mon, 24 Oct 2022 06:57:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTG-0003cJ-0S; 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 1omxSu-0003Rn-UL for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:06 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSt-0003s1-E1 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:04 -0400 Received: by mail-pg1-x52a.google.com with SMTP id f9so4280778pgj.2 for ; Mon, 24 Oct 2022 06:26:02 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:02 -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=Bd4nOs5cndwUPUkE6wb4N+9NYguPemV5ztELXhebcaM=; b=bI54Be1eClS5XTixCR8MX4uST3sWSPzfIjIOTDnQ1x4rA+1MeGIw3N8VPjAdBBA9By Xv/C0+mxsclptUEw7JHttAcxsA5/jXccuETOJ3NUSg0KVR/tIoHqV8w50MvkIy/lJohh 1TXLowBqtH6FEV/hiIMyrsU/ZNxuOAGpro9uVasgMfSwr77pdrbrp7+8oOlxtKr/ZKeG nQnZ7b7+Q3JkMKIsIZ5YuzppyK4CoRSoANpqZMFsNBROpMWCy2/tB+O1z3OXG4XO6lmY +cf2OmryLzb1/zVeAz5dLk1uETkKrKFyljuwguThnSKuoktPHAr/47HgpEwWJ6uPq8lJ mZaQ== 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=Bd4nOs5cndwUPUkE6wb4N+9NYguPemV5ztELXhebcaM=; b=5nKxuSMirNwzG9R4/Dug2F7aGq6emUsgzEDlmiQmFGjBLkSu8ZPjxlVEyd7ULw4BMD Dj3NZ7XIiKoJPj0BFyT/WSAWBy7w1fJ32DrpP6Ldef3IdVvtehOfOuzu8iFTJJRji4Xa EtDkECrPHkpEuxUpqpJg9FHpcCLmxtNoni8Ui3Zt2da/urf4WLUeKkHZDXd8UILB1Hd2 NMWJLd0ekZDgyYXx6u7P7wPcRM0CCWZcRucmZcvnMverXxSGynLfKuR+nVg+lvvmy5yC 8vMEi62D63nsu5Ai4HMWYqoP6WaVoNSm2mgChbTXRxkHylbK8CIgNxgWSxeArpj6E0SI 8/3w== X-Gm-Message-State: ACrzQf3TDFUUiUgYtGLJVkF9HUcgAvOsS6R+mce8fKiZ2IpllqdLGZGe vOpHmzT/2tUFP7cG4m0TOjaXUiUn4+Iaeg== X-Google-Smtp-Source: AMsMyM6qB4hhIkV+P0gC9Wyhdn+DknSjyT0TsUGE1JiMV5S0NJFyjKXt1k/3AOhTv86gZndIzsqD3g== X-Received: by 2002:a05:6a00:114c:b0:528:2c7a:630e with SMTP id b12-20020a056a00114c00b005282c7a630emr33132032pfm.86.1666617962560; Mon, 24 Oct 2022 06:26:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 21/29] target/tricore: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:51 +1000 Message-Id: <20221024132459.3229709-23-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666619863628100005 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/tricore/cpu.c | 11 +++++++++++ target/tricore/translate.c | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index ab7a1e3a6d..2c54a2825f 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -58,6 +58,16 @@ static void tricore_cpu_synchronize_from_tb(CPUState *cs, env->PC =3D tb_pc(tb); } =20 +static void tricore_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + TriCoreCPU *cpu =3D TRICORE_CPU(cs); + CPUTriCoreState *env =3D &cpu->env; + + env->PC =3D data[0]; +} + static void tricore_cpu_reset(DeviceState *dev) { CPUState *s =3D CPU(dev); @@ -161,6 +171,7 @@ static const struct SysemuCPUOps tricore_sysemu_ops =3D= { static const struct TCGCPUOps tricore_tcg_ops =3D { .initialize =3D tricore_tcg_init, .synchronize_from_tb =3D tricore_cpu_synchronize_from_tb, + .restore_state_to_opc =3D tricore_restore_state_to_opc, .tlb_fill =3D tricore_cpu_tlb_fill, }; =20 diff --git a/target/tricore/translate.c b/target/tricore/translate.c index a0558ead71..c5b7bfbf20 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -8886,12 +8886,6 @@ void gen_intermediate_code(CPUState *cs, Translation= Block *tb, int max_insns, &tricore_tr_ops, &ctx.base); } =20 -void -restore_state_to_opc(CPUTriCoreState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->PC =3D data[0]; -} /* * * Initialization --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666625203; cv=none; d=zohomail.com; s=zohoarc; b=m4KA4Ma3goUsMboOG1OdvkmGW40u4rRc/zR30PiVD2ukUGdyd2Aels7BUcFVWbvawqx8EcbT0emV+2HpwwepnTSaFzuC32PdRMGUVN2TQa7BhnbbBjVDF7uWYhpOw17wAvepchMlfiuRSwVNX9AieHFrL+HSiSRxIiGIuoXh/Pw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666625203; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y2RA5owL+HBevavrSq2dUhrDaSLUH9n3FIrHtT1lBI0=; b=DliuFtC5D4WB5l2LMtkjj88Y1a9WcXtdpWmGgP3bdmwBK5oZGDlX/7SVIKE89irNVYLG7crK7qhkGvgVEWDY6GmcXTbDle7iddtoOdWhh4XvCdBx2AiB5jgqffbBf1abmy5xwOzB/2/g1Oxtw9/f/Ez3zdAa1Zd5ixE6b/G8kzM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666625203665716.4947427194231; Mon, 24 Oct 2022 08:26:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTH-0003cp-Fl; Mon, 24 Oct 2022 09:26:27 -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-0003S9-RA for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:13 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxSx-00048y-Lw for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:10 -0400 Received: by mail-pf1-x42c.google.com with SMTP id y13so4398473pfp.7 for ; Mon, 24 Oct 2022 06:26:05 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:04 -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=y2RA5owL+HBevavrSq2dUhrDaSLUH9n3FIrHtT1lBI0=; b=vfAaecPcAnoxMHKL5SKOEsoFuUwYQBo0dx5OrBp8mtvtM5EXWUETUIHrtYTuzbEePp CWnf2cS9ss82tgFctmDAVReddZjRTQt0zzapkin7uzXDjlJ57f15qjYWQte7jukoIHd6 oV7UdZVgfx5bjrW2Duu5XY9griuJMIVqsV4c91l0/bYx4iz34J0u8yRzAKCiehuaPXv9 IJv/26UdGGHTMKVVWyLWXdqv5ISmHZy1enWERe+CN/3vZHJciWbUnKjnSuVYkZm+q+UB EwO5SvjPsce5KYoV1cL+wlINUtGfPON7m88Tx57MGnAC867nCp/k3xsF28f21InyXMgQ Jt6Q== 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=y2RA5owL+HBevavrSq2dUhrDaSLUH9n3FIrHtT1lBI0=; b=pIWgkM8UZ1/rffoRQ/ztIUwFtVpS/NDa+SOFISs/gLKdiElqycBeVcD362tqyPuqaJ xSm3Gob16po+emAREvj7u9A3xkY21L60aFVssDC7zQOK/2yoNXVefTVIvvJwBqHGIzt9 dDmDBL1M70kGA9eMq87hcgJl0IzW8tRsisG/VPld4eXlvmUBWfHC3cRSMQQYQGj2Z1DM 9QhTUcop2quqye7SUVcTfhgbSJfycDl2NBvsHEgFr/gelYSnz9yjKmfW2vyASz5r0Mb/ F+fwxvhwr06SOoGddJkLyPVt35SfCaCGBGPIPprbAXffPJUkCwr3qna9BdN4H/djVv/X lSBA== X-Gm-Message-State: ACrzQf0FpezjTwFrGI80uR0ra2FAH2GNVcEU9A+6uA2gT6CuAoAeDrD4 nFITGCgpBaFNvZDVd07il63duwOAixeJaQ== X-Google-Smtp-Source: AMsMyM4JUWCT3zIOMUPiPodv5l/Rj/JGlglYYrNdRFt22cc1vtdThaMkcHUL5lNQKrMzTylBnyH1UA== X-Received: by 2002:a65:5605:0:b0:46f:1e8d:ece9 with SMTP id l5-20020a655605000000b0046f1e8dece9mr1580371pgs.249.1666617964895; Mon, 24 Oct 2022 06:26:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 22/29] target/xtensa: Convert to tcg_ops restore_state_to_opc Date: Mon, 24 Oct 2022 23:24:52 +1000 Message-Id: <20221024132459.3229709-24-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666625205835100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/xtensa/cpu.c | 10 ++++++++++ target/xtensa/translate.c | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index cbbe0e84a2..09923301c4 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -51,6 +51,15 @@ static vaddr xtensa_cpu_get_pc(CPUState *cs) return cpu->env.pc; } =20 +static void xtensa_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + XtensaCPU *cpu =3D XTENSA_CPU(cs); + + cpu->env.pc =3D data[0]; +} + static bool xtensa_cpu_has_work(CPUState *cs) { #ifndef CONFIG_USER_ONLY @@ -215,6 +224,7 @@ static const struct SysemuCPUOps xtensa_sysemu_ops =3D { static const struct TCGCPUOps xtensa_tcg_ops =3D { .initialize =3D xtensa_translate_init, .debug_excp_handler =3D xtensa_breakpoint_handler, + .restore_state_to_opc =3D xtensa_restore_state_to_opc, =20 #ifndef CONFIG_USER_ONLY .tlb_fill =3D xtensa_cpu_tlb_fill, diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index bdd4690a5c..77bcd71030 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -1355,12 +1355,6 @@ void xtensa_cpu_dump_state(CPUState *cs, FILE *f, in= t flags) } } =20 -void restore_state_to_opc(CPUXtensaState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->pc =3D data[0]; -} - static void translate_abs(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) { --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666619741; cv=none; d=zohomail.com; s=zohoarc; b=m0AQJh918po72sKZdA/5IRigXfls+54d+30Q1zIKoMsqR4zg0YP+zXK39hFrNMYMH9ScaOyFIJLMFmbYWIOKjTflSKWmozW5tACkEuU2y7PpU0p+s/APiToNVwoDfJUY2R8qETpy1gVVHwT1OmvSQrIPRlKsPhCV+F5Ojcy5xF0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666619741; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rhfzvh3ALCSlz+RCzVx7zEuLhN6oXhUWc6NZ2cWIDjQ=; b=SKFJFMRCQI1wVO3n1e3Mp0Ih+quxYWR30qOfKsNG08y+X15KfG36PcNUkrmTGTn8nluDI2G8YFHagy9Bph76P5cLW89J6Ah/Thu2P7qPOrt/WwmXfkNulJ0Xv8FhoEYMBiiYDafZpBomW0jFV89qKR9X80T96qTR9fJv0kxAGko= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666619741723726.7550834236707; Mon, 24 Oct 2022 06:55:41 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AMsMyM7c1UZ5tK0wWk+KIGj6HBIsihGFq9ZOf8LfjCiZB0vbmn+a5uLC1ENCBTksJXuy9dqXYIKmlQ== 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) 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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666619742811100001 Content-Type: text/plain; charset="utf-8" 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 =20 -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_ico= unt) { - target_ulong data[TARGET_INSN_START_WORDS]; + uint64_t data[TARGET_INSN_START_WORDS]; uintptr_t host_pc =3D (uintptr_t)tb->tc.ptr; const uint8_t *p =3D tb->tc.ptr + tb->tc.size; int i, j, num_insns =3D tb->icount; @@ -368,19 +368,7 @@ static int cpu_restore_state_from_tb(CPUState *cpu, Tr= anslationBlock *tb, cpu_neg(cpu)->icount_decr.u16.low +=3D num_insns - i; } =20 - { - const struct TCGCPUOps *ops =3D cpu->cc->tcg_ops; - __typeof(ops->restore_state_to_opc) restore =3D ops->restore_state= _to_opc; - if (restore) { - uint64_t d64[TARGET_INSN_START_WORDS]; - for (i =3D 0; i < TARGET_INSN_START_WORDS; ++i) { - d64[i] =3D 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); =20 #ifdef CONFIG_PROFILER qatomic_set(&prof->restore_time, --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666619966; cv=none; d=zohomail.com; s=zohoarc; b=jh2GResDPhTSIL7ZsKYge1XBfblf69RCD1tESdZuebgFXFhxfPzawWV1s9aKQDXb0I80tQ/i/ukYhGj22eF+Rg5llo23ygheeTxMYep63SgV7P5Ob5UQuUNlhJSa4nJo9dWcy5Oexwke9RfZRYKC4862KInS48rTz9DVHQJbQhg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666619966; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FfZkTOiMtNPBh8Ui9QTeSKWabSxEGAfOyIzL8felDmc=; b=AiPMvxEP1NHO41e5UzkFKNO1aqMmQF0SMdYMqEdKgJB9x4Il+17/W3mXuPbwj9jlyEPM23YY/XQTrHcebPNid/BmKHOO9ZFycZzIpriKOZTT/yzf9vyoZgTy3S+rJRhcFXJM/ncV/DE3Lx/2LolZdNtYjk45fDleGw0QV2dZTiM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666619966505846.536693608174; Mon, 24 Oct 2022 06:59:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTM-0003gs-T2; Mon, 24 Oct 2022 09:26: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 1omxTF-0003bk-2A for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:25 -0400 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxTC-0004DH-AI for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:24 -0400 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1324e7a1284so11794396fac.10 for ; Mon, 24 Oct 2022 06:26:21 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:09 -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=FfZkTOiMtNPBh8Ui9QTeSKWabSxEGAfOyIzL8felDmc=; b=PN/u+mZTCA3jqFCYAaqoT467woxydzI73UhwNYKu1EUabOt8L9ygOyApEUf2mUt7Ic rME3xK4oCMlKeyAwx62i+2TchzXM/hhc6zwOm5JWhqhwT6Jdc7PoDe89Cip8QX9fz/Aa o7Tr30y7vbM8ecr67uLEMG2EmtLTRERv3MOafvZZXYxw23OVmCLESj67+/F7UVTCyjzI 1Q94yAXhG/OTKJVjlpW/jTuXQFd2mD2FuHsQ43f7kwqir5GoWIGMwnZIG6snpfrC/vLT sqx+/7ViBwXUf8riqFfLeMGAZmNA4rq9+QOW1dICrXmZE3SWIn7IXYCgjhhl6P2DtQwz z0Jg== 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=FfZkTOiMtNPBh8Ui9QTeSKWabSxEGAfOyIzL8felDmc=; b=UxnANq35ZkLcw01r0NytHX38L8/J48Dso/TrCERt5K6o8x8eQ/M66NpZE7npsdA11z vWUGBZdOrFV1/xOXz0VXgs/yUa4LbEny0Ia0goXCM0qE+1Q8RcLAQhejtnLsYppwAauF mAjRwVxVGnYFUu8axNbaL+qJAESYwsR8T6Zy3p7wCCUSWr+83n5C6bK+kUkG1I6hM/5r wZTAL4o7CMFlP2tQzkCCAwz/aJw7frofOWmCmlEZeGB2bb6LstANCfh17qDRisORCo5V grnhCEg56lKRcvaca9eUxBHbhFTmqrVbm2wKLv+QwEvsuSx2V8onKpURd37PBjwndPTy Bocw== X-Gm-Message-State: ACrzQf0ja9ftypotSN2yugZ1tavsdsz/D3JJeb5lMg3J1UGWG0sSlfWe a6UgQ7JboZ1jToGFYv48WkFz/QpSeXQaMA== X-Google-Smtp-Source: AMsMyM4H/ZnlImyV7Byt8kDvpdw4z9ZetIlmzjj4nfHUdEL5mpw4D+Qr7UBlTu0WaNgBOASBOC1lYQ== X-Received: by 2002:a17:90a:5996:b0:203:1640:2dbf with SMTP id l22-20020a17090a599600b0020316402dbfmr39366535pji.150.1666617969696; Mon, 24 Oct 2022 06:26:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 24/29] accel/tcg: Introduce cpu_unwind_state_data Date: Mon, 24 Oct 2022 23:24:54 +1000 Message-Id: <20221024132459.3229709-26-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:4860:4864:20::34; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x34.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666619968156100003 Content-Type: text/plain; charset="utf-8" Add a way to examine the unwind data without actually restoring the data back into env. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 13 ++++++++ accel/tcg/translate-all.c | 68 ++++++++++++++++++++++++++------------- 2 files changed, 58 insertions(+), 23 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 300832bd0b..d49cf113dd 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -39,6 +39,19 @@ typedef ram_addr_t tb_page_addr_t; #define TB_PAGE_ADDR_FMT RAM_ADDR_FMT #endif =20 +/** + * cpu_unwind_state_data: + * @cpu: the vCPU state is to be restore to + * @host_pc: the host PC the fault occurred at + * @data: output data + * + * Attempt to load the the unwind state for a host pc occurring in + * translated code. If the searched_pc is not in translated code, + * the function returns false; otherwise @data is loaded. + * This is the same unwind info as given to restore_state_to_opc. + */ +bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *dat= a); + /** * 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 e4386b3198..c772e3769c 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -320,29 +320,20 @@ static int encode_search(TranslationBlock *tb, uint8_= t *block) return p - block; } =20 -/* The cpu state corresponding to 'searched_pc' is restored. - * When reset_icount is true, current TB will be interrupted and - * icount should be recalculated. - */ -static int cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, - uintptr_t searched_pc, bool reset_ico= unt) +static int cpu_unwind_data_from_tb(TranslationBlock *tb, uintptr_t host_pc, + uint64_t *data) { - uint64_t data[TARGET_INSN_START_WORDS]; - uintptr_t host_pc =3D (uintptr_t)tb->tc.ptr; + uintptr_t iter_pc =3D (uintptr_t)tb->tc.ptr; const uint8_t *p =3D tb->tc.ptr + tb->tc.size; int i, j, num_insns =3D tb->icount; -#ifdef CONFIG_PROFILER - TCGProfile *prof =3D &tcg_ctx->prof; - int64_t ti =3D profile_getclock(); -#endif =20 - searched_pc -=3D GETPC_ADJ; + host_pc -=3D GETPC_ADJ; =20 - if (searched_pc < host_pc) { + if (host_pc < iter_pc) { return -1; } =20 - memset(data, 0, sizeof(data)); + memset(data, 0, sizeof(uint64_t) * TARGET_INSN_START_WORDS); if (!TARGET_TB_PCREL) { data[0] =3D tb_pc(tb); } @@ -353,19 +344,40 @@ static int cpu_restore_state_from_tb(CPUState *cpu, T= ranslationBlock *tb, for (j =3D 0; j < TARGET_INSN_START_WORDS; ++j) { data[j] +=3D decode_sleb128(&p); } - host_pc +=3D decode_sleb128(&p); - if (host_pc > searched_pc) { - goto found; + iter_pc +=3D decode_sleb128(&p); + if (iter_pc > host_pc) { + return num_insns - i; } } return -1; +} + +/* + * The cpu state corresponding to 'host_pc' is restored. + * When reset_icount is true, current TB will be interrupted and + * icount should be recalculated. + */ +static void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, + uintptr_t host_pc, bool reset_icount) +{ + uint64_t data[TARGET_INSN_START_WORDS]; +#ifdef CONFIG_PROFILER + TCGProfile *prof =3D &tcg_ctx->prof; + int64_t ti =3D profile_getclock(); +#endif + int insns_left =3D cpu_unwind_data_from_tb(tb, host_pc, data); + + if (insns_left < 0) { + return; + } =20 - found: if (reset_icount && (tb_cflags(tb) & CF_USE_ICOUNT)) { assert(icount_enabled()); - /* Reset the cycle counter to the start of the block - and shift if to the number of actually executed instructions */ - cpu_neg(cpu)->icount_decr.u16.low +=3D num_insns - i; + /* + * Reset the cycle counter to the start of the block and + * shift if to the number of actually executed instructions. + */ + cpu_neg(cpu)->icount_decr.u16.low +=3D insns_left; } =20 cpu->cc->tcg_ops->restore_state_to_opc(cpu, tb, data); @@ -375,7 +387,6 @@ static int cpu_restore_state_from_tb(CPUState *cpu, Tra= nslationBlock *tb, prof->restore_time + profile_getclock() - ti); qatomic_set(&prof->restore_count, prof->restore_count + 1); #endif - return 0; } =20 bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc, bool will_exit) @@ -408,6 +419,17 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t host_p= c, bool will_exit) return false; } =20 +bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *dat= a) +{ + if (in_code_gen_buffer((const void *)(host_pc - tcg_splitwx_diff))) { + TranslationBlock *tb =3D tcg_tb_lookup(host_pc); + if (tb) { + return cpu_unwind_data_from_tb(tb, host_pc, data) >=3D 0; + } + } + return false; +} + void page_init(void) { page_size_init(); --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666620852; cv=none; d=zohomail.com; s=zohoarc; b=kOds2apPpyP89xmWv2U2XrGJXqJYsQK2PEMHk22dhlWHoQtf+bMFmmzuyf3a52vPt/nWV3jOeFneZxWf6TKeTJKy9oXI3SjUtluVRuZP0tDl5wYjxXFWhANzeAnq94q+nMXIWyhhwGrvqDrLoOmiFikhnHWb+Nbcb6wxRULDdUo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620852; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=frs+W2o45yhX0BGjDiwQgjk/MyzDxe9aB6tmUVXaXnc=; b=VwIc9/y7u0m1VMZwyxFh7KR2jITfSaULu8ksachANLNrix5bjo+bp+KgbWf2Zi+zlRsfKvoE97h6hs15LyF9E5mv3tPjgAvT3L62IvYgm2MYkBAH4twLvHh6YR+vL/l4Iz1REz7sTL/CX4OxF7Hjn6VU7hOwga9gWmYNoQljNSM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666620852730540.5555700644434; Mon, 24 Oct 2022 07:14:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTJ-0003d6-76; Mon, 24 Oct 2022 09:26: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 1omxTB-0003WS-Ba for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:21 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxT7-0004Ah-HZ for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:20 -0400 Received: by mail-pj1-x102f.google.com with SMTP id u8-20020a17090a5e4800b002106dcdd4a0so12986038pji.1 for ; Mon, 24 Oct 2022 06:26:12 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:11 -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=frs+W2o45yhX0BGjDiwQgjk/MyzDxe9aB6tmUVXaXnc=; b=GL89LzGxw3vwUBek27SLSl4T8sEFR3afmAlQ1CBFCaYK6IksyynvNb+EoMLBFAT0Gi k1MIo/dwoV03jRfO46XllepsGV1DpIO8CSYFBhnMNgn8QyBz0gnIDEd2jtCu7ygb1+v3 pU50r+wbkgZAcAvJiY6offrmw/AvRg+5kewDmSAITCiJy6mrvbUOe5HhZ6uK6F+YlMZ3 K3WLHkEbgfSH0pLZiBbMqps42jVq9e8sYP9kGWrLzg2/U8vPY6Hw3yA9KEzIEKs23Klj rtHfpr3SpiqvQ759TEiki9Rtt+iCidT/PDSp0rfwKJTmdwO8fiM9WkptWow8wt30x4Qx NCzw== 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=frs+W2o45yhX0BGjDiwQgjk/MyzDxe9aB6tmUVXaXnc=; b=n+WaB4FGNxrtRKWu9xdWciGbD82Z3ASzEoOGv9eHfY3wU01D8PP5BVmQv3S0pHpybl kZXFEf8QGOcDUS648AcLN0Dh3ryphheOXty1P0NTeZynYFjRmYLJ4XprAf6rkcZFhOVS dft9+/rfwjrken/GuX3jBn4ItKfSQGlGaL6aJO9lavUGDlsD3+be6DG2dK8DzP48Yapx wAufapFIgoJsdFAuzvBU2lLO7cWuKf4fm5ynsy3O4FFCqfldEH4FOqWlkl5Hocu5MSNY dkPAZ2HQp7CcFNFtJlI4zL3MpBn+7F47dwPARdozvX0osIvzVsmlIXCZIrE3eTq4bdd/ wbtw== X-Gm-Message-State: ACrzQf06yft66NhCH6Xe507VPyHzQJSqNFSGNn8MpDjGCGiQied9+8wj 3km22zPYKgXl5U2f+wkTEWnYT/9rrDs/qQ== X-Google-Smtp-Source: AMsMyM4CfHz86hhjU7b1Z3U7KkDep9YjJ/fZo7kHAUvGWREy5QjDm6ogSB5oGbsXkQs+GuWmUThqWQ== X-Received: by 2002:a17:902:d183:b0:186:8d50:75bb with SMTP id m3-20020a170902d18300b001868d5075bbmr11435218plb.159.1666617971770; Mon, 24 Oct 2022 06:26:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 25/29] target/i386: Use cpu_unwind_state_data for tpr access Date: Mon, 24 Oct 2022 23:24:55 +1000 Message-Id: <20221024132459.3229709-27-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102f.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666620853695100001 Content-Type: text/plain; charset="utf-8" Avoid cpu_restore_state, and modifying env->eip out from underneath the translator with TARGET_TB_PCREL. There is some slight duplication from x86_restore_state_to_opc, but it's just a few lines. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1269 Signed-off-by: Richard Henderson --- target/i386/helper.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/target/i386/helper.c b/target/i386/helper.c index b62a1e48e2..2cd1756f1a 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -509,6 +509,23 @@ void cpu_x86_inject_mce(Monitor *mon, X86CPU *cpu, int= bank, } } =20 +static target_ulong get_memio_eip(CPUX86State *env) +{ + uint64_t data[TARGET_INSN_START_WORDS]; + CPUState *cs =3D env_cpu(env); + + if (!cpu_unwind_state_data(cs, cs->mem_io_pc, data)) { + return env->eip; + } + + /* Per x86_restore_state_to_opc. */ + if (TARGET_TB_PCREL) { + return (env->eip & TARGET_PAGE_MASK) | data[0]; + } else { + return data[0] - env->segs[R_CS].base; + } +} + void cpu_report_tpr_access(CPUX86State *env, TPRAccess access) { X86CPU *cpu =3D env_archcpu(env); @@ -519,9 +536,9 @@ void cpu_report_tpr_access(CPUX86State *env, TPRAccess = access) =20 cpu_interrupt(cs, CPU_INTERRUPT_TPR); } else if (tcg_enabled()) { - cpu_restore_state(cs, cs->mem_io_pc, false); + target_ulong eip =3D get_memio_eip(env); =20 - apic_handle_tpr_access_report(cpu->apic_state, env->eip, access); + apic_handle_tpr_access_report(cpu->apic_state, eip, access); } } #endif /* !CONFIG_USER_ONLY */ --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666618705; cv=none; d=zohomail.com; s=zohoarc; b=AC1l7TYUHba3DtjAuCfqOuKeJlSwprmk2RJpUoZaqeDV7S/bo53f8Ow3Crt6HXqwW0QaM8q1lOhvMIFVFq0Z94Mvv6L1sqB3KGF/6Z8BSwfofa/zMqVtxyy01aaqnUtKyV44cmLEPT3whmbYgvE2pNNX0XjLM/WD+2GdEH3JM2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666618705; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=27tU7q4skqyWhNaj53PDReLhseNs0R74OdN+/vV4qx0=; b=HqpgJ442sl82e8rSRAr2J3WJFZL5cdTRwlJy4zjok5ZC6y1HnICo1kw6FKo87b808V2P51jcG5MSO0LHDWkBggAeewbTRDibvkg9KjQ6MvyY3LF6vy32sY2BlTPz0o23BW1BYHg9QHakEgXf+RNyvPbfrlDuN0KWeQRnh0ed/BQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666618705928271.0730497253677; Mon, 24 Oct 2022 06:38:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTI-0003cv-Li; Mon, 24 Oct 2022 09:26:28 -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 1omxTA-0003W8-7S for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:21 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxT8-0004B9-A9 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:20 -0400 Received: by mail-pj1-x1035.google.com with SMTP id v4-20020a17090a088400b00212cb0ed97eso8848051pjc.5 for ; Mon, 24 Oct 2022 06:26:15 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:13 -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=27tU7q4skqyWhNaj53PDReLhseNs0R74OdN+/vV4qx0=; b=UDesVsJh2VpOjVc027a6U5SDvYLB80WN9z52DdwNRDfq77l9NrTUepEQ7gjN5ZXj33 +NKphz+USTl4lNRIBL2i0zwStz/OedNLgegUFE1BHtkJvr2qK8a4Dtw8RF7iGe0bGI9M 3HeSPf5JAGIumRTEBEAEahxtoHKtkqoz4r9JEQQ1bYkqdWAimeqp0SBtHDpth/aQSnH7 iB2caxBO0NyKnhA81bpvKqsoPg3xIbecJHp3dtoKIstdyURC6f2jqOZuCHxpml+3zNsS X9gR3fTFPrnWXUodLqt8gOSrEtSBv3pAwrXw4aKmcVrn1Bc2agdjNFIOBdSoBSldjQD8 GjgQ== 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=27tU7q4skqyWhNaj53PDReLhseNs0R74OdN+/vV4qx0=; b=lhYkrMMw7lCXthU4nnyPDfDbqjgzrNLSWQekoZfG4xOpEEWY0KzsmP/57Zm4HbX3vF EVKk0f/MiYcRHCcyFua4Mxn9n9M9GYne70zpVsPC8pt9ceYwpuurTJdUHvDKY1iRnBOV kcPZ/7fFGwmUHkhAGmVVVPaR9CLfYGoElYycCnHvutIt7BRVz+LWCyN2E/2PUxcj8Na/ U+9rRmqWIp5tGpgoWnzLVFL87/WMa0wN6Lu2eiqpToBmPqApLeVs1V5FznZK2Gjk4ROc F0R9UCWli28AV/y2LSuk8I0GeZOr3BdRMHblaBKIYbIEpnjFGt5zkYsSXg/JrcKyXhkz Xa3A== X-Gm-Message-State: ACrzQf1n86aqu43pGUvhPOfUECFLo7v4pwoiIKlipDwogiZ5QUK4RNlX fLlsYo9pzXtGhSvV/RtjMtGofjIJrC5ebQ== X-Google-Smtp-Source: AMsMyM4Rz+aeg+Wc7hYo9y9zjX2Ombziam7y2M0KAgo9rXP5g7lgUndkIhTq6Yv1u4HibVKhRkJaEg== X-Received: by 2002:a17:902:6a81:b0:186:7df2:340 with SMTP id n1-20020a1709026a8100b001867df20340mr16521310plk.120.1666617974245; Mon, 24 Oct 2022 06:26:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 26/29] target/openrisc: Always exit after mtspr npc Date: Mon, 24 Oct 2022 23:24:56 +1000 Message-Id: <20221024132459.3229709-28-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666618706176100001 Content-Type: text/plain; charset="utf-8" We have called cpu_restore_state asserting will_exit. Do not go back on that promise. This affects icount. Signed-off-by: Richard Henderson --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index 09b3c97d7c..a3508e421d 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -51,8 +51,8 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong sp= r, target_ulong rb) if (env->pc !=3D rb) { env->pc =3D rb; env->dflag =3D 0; - cpu_loop_exit(cs); } + cpu_loop_exit(cs); break; =20 case TO_SPR(0, 17): /* SR */ --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666621228; cv=none; d=zohomail.com; s=zohoarc; b=LMM1bfM6X9JJZcCdpkXphge94WvzzbShSte2vaF6rGl8x9vIKkQZWMGyjvzPyggQtp+U1Ua+BGAVwyxoj7XgP8K8MU0V7ABCFMw6TVygCX4evwlQgB7/XxHNVB78tLBnJvE7cN3BjP6WYzry7LfC5k9L07UU553aDSVad5X085E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666621228; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Oz6SbhxWMBqT3eH0LGJA5+0yBaJCELCj9GF6rT/F9o0=; b=jbembeSWjjHaaa4IFORGS0RFm5w8u9lVrUXPJtZNXjGSnn763R93WtQuHEIMF/uj7x/B7eyUQ9e3o5DoXWR+kqXjQkE85Y/9rZqDKWgA4ht8yUWHSUTWfPomFisdV4POOQlbK3Z+da4hf+YCQHWc6acjtuN2oVS/Qa0oHpPd8uk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666621228828769.3778892556187; Mon, 24 Oct 2022 07:20:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTJ-0003d8-Ny; Mon, 24 Oct 2022 09:26: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 1omxTB-0003X7-K1 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:21 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxT8-0004BY-AQ for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:21 -0400 Received: by mail-pj1-x102d.google.com with SMTP id q9-20020a17090a178900b00212fe7c6bbeso3073239pja.4 for ; Mon, 24 Oct 2022 06:26:17 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:16 -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=Oz6SbhxWMBqT3eH0LGJA5+0yBaJCELCj9GF6rT/F9o0=; b=yx/5yQr9Z8WKCYyjmPZbdv+QzggBr5pqdKn+rSyHy8PL9iHKACjScUu0c9+oME83x5 0gR+WtQewuOoTgMsSTztcbcx2u/qnE9/mRWMiWdqXDpkY0RQuD5diRbQTryRGfHDQD0c k848wrRy4VvL5jtP+eceNAzH1ujMhbsZ/yxyjxm/o+bL1QIwY3qCca5E4KLGO6Yxo2Jt jaFwBm0YZ9gB615XCGoijz2vzyiMv6OZoKWYX3pz+caoWE3iUx1Iu11ycR/fm9opxZSI 24WN5XczjLVPTHbQ1uc8nOj9XZ2vhkIS2WpBUOY/pf+UKQJ+jO3cVzccoKxb5nyoZjyl 16tw== 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=Oz6SbhxWMBqT3eH0LGJA5+0yBaJCELCj9GF6rT/F9o0=; b=rvwL7MHFYDtopo6LsQkpIkzLFxUCS2MzfBjpFz3bwEu8cXLCzSomDSGsLu0YlPqZkc BsgNsEuhVo+whgI9WP4Vr7wNGAu8VabEkvrM6HCvPksyAZ1Ttz3+D3MLHm57II9ljdw+ qldcFhDm2rQUnITJq1eOOtOOiijrSAd35Je4ndzJAgnFBVVS5/0AEx9E49fVlgHlxWI5 repDbQBQYFlBrALwSS+juJJSlt+E9X0KwWIy5FbpBNIgZPtd4nLETYmZ1Ga1So69Hxlk kaMlQlcdG//Y03uIgAziGdByI4hmWJmITLKu3vdTNuVzTCOzNUMgjXsueFAAUYXskbEU JU1Q== X-Gm-Message-State: ACrzQf01ZVMqXSPuqPCqbKJZLHQj4uZ9n2PV01QN9u0A2MOIzWSXATSm YlcSUVUNS6uRMCtsT7+/eviJQkqgG7RshA== X-Google-Smtp-Source: AMsMyM6ZmFXsk6uj7iW+PzOQiEYNK1mlHAW8fNTirO36yo3SMt/3hlH8M3Tg8CK/ykxiSpVwWynYFg== X-Received: by 2002:a17:90b:3a86:b0:20d:616f:4bb6 with SMTP id om6-20020a17090b3a8600b0020d616f4bb6mr75106842pjb.238.1666617976655; Mon, 24 Oct 2022 06:26:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 27/29] target/openrisc: Use cpu_unwind_state_data for mfspr Date: Mon, 24 Oct 2022 23:24:57 +1000 Message-Id: <20221024132459.3229709-29-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102d.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666621230135100003 Content-Type: text/plain; charset="utf-8" Since we do not plan to exit, use cpu_unwind_state_data and extract exactly the data requested. Signed-off-by: Richard Henderson --- target/openrisc/sys_helper.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index a3508e421d..dde2fa1623 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -199,6 +199,7 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, targe= t_ulong rd, target_ulong spr) { #ifndef CONFIG_USER_ONLY + uint64_t data[TARGET_INSN_START_WORDS]; MachineState *ms =3D MACHINE(qdev_get_machine()); OpenRISCCPU *cpu =3D env_archcpu(env); CPUState *cs =3D env_cpu(env); @@ -232,14 +233,20 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, tar= get_ulong rd, return env->evbar; =20 case TO_SPR(0, 16): /* NPC (equals PC) */ - cpu_restore_state(cs, GETPC(), false); + if (cpu_unwind_state_data(cs, GETPC(), data)) { + return data[0]; + } return env->pc; =20 case TO_SPR(0, 17): /* SR */ return cpu_get_sr(env); =20 case TO_SPR(0, 18): /* PPC */ - cpu_restore_state(cs, GETPC(), false); + if (cpu_unwind_state_data(cs, GETPC(), data)) { + if (data[1] & 2) { + return data[0] - 4; + } + } return env->ppc; =20 case TO_SPR(0, 32): /* EPCR */ --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666623762; cv=none; d=zohomail.com; s=zohoarc; b=ZAhvnzlWWLAoNRYf5o54AUwknqSBByr11auK6TGVaCF0fZDmz9dvMxWshbyYuBZkubWIj/LY3a2MA6KjmjqWJLQmQLRqeMTp+1jkDaGkVelJI5+lbS5VgVkftJKVSHLZzU/QBlTeadit1s+/BY2YDTGOnXJw9VKcaVnX/Pamfl4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666623762; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dn5Kj+KGyyR61Cy2pV4zzubK77dAehTOMqwWxmCutmQ=; b=frEpTIeq7pQlY8DG0tKxC3iSv+jAeLsgfA57LLzO2N2x3CyP9L+tLsN3ZqorHTx+m69hQkZQqnSaGIi8SHSwDkjMKVBh/k1CqRHoiSuX9obH43/Ri2H9IyqW46vGLL+iYaAw1DNkuxNa833TbeAJWW9+0NzoFg1yf50dxLsjpFA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16666237627151013.00274533226; Mon, 24 Oct 2022 08:02:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTL-0003g6-LF; Mon, 24 Oct 2022 09:26:31 -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 1omxTE-0003ab-7y for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:24 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxTA-0004Cu-Oi for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:23 -0400 Received: by mail-pj1-x102a.google.com with SMTP id z5-20020a17090a8b8500b00210a3a2364fso9022633pjn.0 for ; Mon, 24 Oct 2022 06:26:20 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26: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=dn5Kj+KGyyR61Cy2pV4zzubK77dAehTOMqwWxmCutmQ=; b=qBjSSfLWBrDIfyMj2jVnY+tSGbaEv9O10/o1IkYX2iAYIIf9haD4tLYOlckLrA5Nay lnDh9GQZeR/dCBkSLCrFRYMzl03VrLVHdMQ2gZF9OfymQkvh0nEVS/iWYXhidg7yXdhK xbt9DbcrCwvSYoz9eS6cd7hgG7y2Ua9iLuyfUnp51tcbp0zYZl2RLVTF/gP0LZ1jbyjY pIf+yLXTW7KLcJNUR9vBod/mO95G6MY6KvDIKo4W9qTj5at58A546+WDKLT7V5tOAfuB yMSIUsQmDyWWWu8XiyYKNIIknw1iT8+KU6Ulup8s4iD9mb8TE9v6NTxtE1A8XHJUAPLD DWSw== 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=dn5Kj+KGyyR61Cy2pV4zzubK77dAehTOMqwWxmCutmQ=; b=4yQetlJ999nrMtCqgDIIHoBPK0pSOiwIm8EVm9/ut9c7FPHuKiN9jCdaFJJJEiFnig 7TzYRdnXvTcbKNrN7ZdhbByN9Ec4GilYAEiG39NejMaHegYDk3i7CiE1nHppCrJ+MlpB 9eDeDQua0iz5AJ/xrRjSfOhzelzjv1arZ2XeecU6VQxgQzckp1nqWWgpNzp9enfliH4C p8uXK1VchdY+ZGCGC+ZdnqQib+GuH+iD9MtnUF4R2USFEDoHDpwfM8ONFl3LKsFSBQho 8SlHUFzlGqOSkebdkjSUXNqF46PBFothKbZ8LrutkeAuRwXNwbe87uq1soaxznkubBdP WL4Q== X-Gm-Message-State: ACrzQf3cpk5Vhq0qXsYSGn+FoNUBzGa4UTym8Q1CqPWUPOi+Va4mrGmE E+Q/xeVirJMCGUobE7Z+sxkEgv2FmMZgMw== X-Google-Smtp-Source: AMsMyM7pY9mhdIedpVlwv2NMDVjxC9rk6xdJpbwZpIiQCLPMXvGq3o7iS9RbZV3p83U5vsCQ+uuHmw== X-Received: by 2002:a17:90a:b00a:b0:213:623:2c12 with SMTP id x10-20020a17090ab00a00b0021306232c12mr7315807pjq.153.1666617979046; Mon, 24 Oct 2022 06:26:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 28/29] accel/tcg: Remove will_exit argument from cpu_restore_state Date: Mon, 24 Oct 2022 23:24:58 +1000 Message-Id: <20221024132459.3229709-30-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666623764676100001 Content-Type: text/plain; charset="utf-8" The value passed is always true, and if the target's synchronize_from_tb hook is non-trivial, not exiting may be erroneous. Signed-off-by: Richard Henderson Reviewed-by: Claudio Fontana --- include/exec/exec-all.h | 9 ++++----- accel/tcg/cpu-exec-common.c | 2 +- accel/tcg/translate-all.c | 12 ++---------- target/alpha/helper.c | 2 +- target/alpha/mem_helper.c | 2 +- target/arm/op_helper.c | 2 +- target/arm/tlb_helper.c | 8 ++++---- target/cris/helper.c | 2 +- target/i386/tcg/sysemu/svm_helper.c | 2 +- target/m68k/op_helper.c | 4 ++-- target/microblaze/helper.c | 2 +- target/nios2/op_helper.c | 2 +- target/openrisc/sys_helper.c | 4 ++-- target/ppc/excp_helper.c | 2 +- target/s390x/tcg/excp_helper.c | 2 +- target/tricore/op_helper.c | 2 +- target/xtensa/helper.c | 6 +++--- 17 files changed, 28 insertions(+), 37 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index d49cf113dd..4078f4ceec 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -56,16 +56,15 @@ bool cpu_unwind_state_data(CPUState *cpu, uintptr_t hos= t_pc, uint64_t *data); * cpu_restore_state: * @cpu: the vCPU state is to be restore to * @searched_pc: the host PC the fault occurred at - * @will_exit: true if the TB executed will be interrupted after some - cpu adjustments. Required for maintaining the correct - icount valus * @return: true if state was restored, false otherwise * * Attempt to restore the state for a fault occurring in translated * code. If the searched_pc is not in translated code no state is - * restored and the function returns false. + * restored and the function returns false. After calling this function, + * we must return to the main loop -- required for maintaining the + * correct icount values. */ -bool cpu_restore_state(CPUState *cpu, uintptr_t searched_pc, bool will_exi= t); +bool cpu_restore_state(CPUState *cpu, uintptr_t searched_pc); =20 G_NORETURN void cpu_loop_exit_noexc(CPUState *cpu); G_NORETURN void cpu_loop_exit(CPUState *cpu); diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index be6fe45aa5..c7bc8c6efa 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -71,7 +71,7 @@ void cpu_loop_exit(CPUState *cpu) void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc) { if (pc) { - cpu_restore_state(cpu, pc, true); + cpu_restore_state(cpu, pc); } cpu_loop_exit(cpu); } diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index c772e3769c..dd439b5e3c 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -389,16 +389,8 @@ static void cpu_restore_state_from_tb(CPUState *cpu, T= ranslationBlock *tb, #endif } =20 -bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc, bool will_exit) +bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc) { - /* - * The pc update associated with restore without exit will - * break the relative pc adjustments performed by TARGET_TB_PCREL. - */ - if (TARGET_TB_PCREL) { - assert(will_exit); - } - /* * The host_pc has to be in the rx region of the code buffer. * If it is not we will not be able to resolve it here. @@ -412,7 +404,7 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc= , bool will_exit) if (in_code_gen_buffer((const void *)(host_pc - tcg_splitwx_diff))) { TranslationBlock *tb =3D tcg_tb_lookup(host_pc); if (tb) { - cpu_restore_state_from_tb(cpu, tb, host_pc, will_exit); + cpu_restore_state_from_tb(cpu, tb, host_pc, true); return true; } } diff --git a/target/alpha/helper.c b/target/alpha/helper.c index a5a389b5a3..970c869771 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -532,7 +532,7 @@ G_NORETURN void dynamic_excp(CPUAlphaState *env, uintpt= r_t retaddr, cs->exception_index =3D excp; env->error_code =3D error; if (retaddr) { - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); /* Floating-point exceptions (our only users) point to the next PC= . */ env->pc +=3D 4; } diff --git a/target/alpha/mem_helper.c b/target/alpha/mem_helper.c index 47283a0612..a39b52c5dd 100644 --- a/target/alpha/mem_helper.c +++ b/target/alpha/mem_helper.c @@ -28,7 +28,7 @@ static void do_unaligned_access(CPUAlphaState *env, vaddr= addr, uintptr_t retadd uint64_t pc; uint32_t insn; =20 - cpu_restore_state(env_cpu(env), retaddr, true); + cpu_restore_state(env_cpu(env), retaddr); =20 pc =3D env->pc; insn =3D cpu_ldl_code(env, pc); diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c index c5bde1cfcc..70672bcd9f 100644 --- a/target/arm/op_helper.c +++ b/target/arm/op_helper.c @@ -78,7 +78,7 @@ void raise_exception_ra(CPUARMState *env, uint32_t excp, = uint32_t syndrome, * we must restore CPU state here before setting the syndrome * the caller passed us, and cannot use cpu_loop_exit_restore(). */ - cpu_restore_state(cs, ra, true); + cpu_restore_state(cs, ra); raise_exception(env, excp, syndrome, target_el); } =20 diff --git a/target/arm/tlb_helper.c b/target/arm/tlb_helper.c index 69b0dc69df..0f4f4fc809 100644 --- a/target/arm/tlb_helper.c +++ b/target/arm/tlb_helper.c @@ -156,7 +156,7 @@ void arm_cpu_do_unaligned_access(CPUState *cs, vaddr va= ddr, ARMMMUFaultInfo fi =3D {}; =20 /* now we have a real cpu fault */ - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); =20 fi.type =3D ARMFault_Alignment; arm_deliver_fault(cpu, vaddr, access_type, mmu_idx, &fi); @@ -196,7 +196,7 @@ void arm_cpu_do_transaction_failed(CPUState *cs, hwaddr= physaddr, ARMMMUFaultInfo fi =3D {}; =20 /* now we have a real cpu fault */ - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); =20 fi.ea =3D arm_extabort_type(response); fi.type =3D ARMFault_SyncExternal; @@ -252,7 +252,7 @@ bool arm_cpu_tlb_fill(CPUState *cs, vaddr address, int = size, return false; } else { /* now we have a real cpu fault */ - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); arm_deliver_fault(cpu, address, access_type, mmu_idx, fi); } } @@ -271,7 +271,7 @@ void arm_cpu_record_sigsegv(CPUState *cs, vaddr addr, * We report both ESR and FAR to signal handlers. * For now, it's easiest to deliver the fault normally. */ - cpu_restore_state(cs, ra, true); + cpu_restore_state(cs, ra); arm_deliver_fault(cpu, addr, access_type, MMU_USER_IDX, &fi); } =20 diff --git a/target/cris/helper.c b/target/cris/helper.c index 91e4aeb178..81a72699b5 100644 --- a/target/cris/helper.c +++ b/target/cris/helper.c @@ -87,7 +87,7 @@ bool cris_cpu_tlb_fill(CPUState *cs, vaddr address, int s= ize, cs->exception_index =3D EXCP_BUSFAULT; env->fault_vector =3D res.bf_vec; if (retaddr) { - if (cpu_restore_state(cs, retaddr, true)) { + if (cpu_restore_state(cs, retaddr)) { /* Evaluate flags after retranslation. */ helper_top_evaluate_flags(env); } diff --git a/target/i386/tcg/sysemu/svm_helper.c b/target/i386/tcg/sysemu/s= vm_helper.c index 8e88567399..2d27731b60 100644 --- a/target/i386/tcg/sysemu/svm_helper.c +++ b/target/i386/tcg/sysemu/svm_helper.c @@ -704,7 +704,7 @@ void cpu_vmexit(CPUX86State *env, uint32_t exit_code, u= int64_t exit_info_1, { CPUState *cs =3D env_cpu(env); =20 - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); =20 qemu_log_mask(CPU_LOG_TB_IN_ASM, "vmexit(%08x, %016" PRIx64 ", %016" PRIx64 ", " TARGET_FMT_lx ")!\n", diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 5da176d642..1ce850bbc5 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -460,7 +460,7 @@ void m68k_cpu_transaction_failed(CPUState *cs, hwaddr p= hysaddr, vaddr addr, M68kCPU *cpu =3D M68K_CPU(cs); CPUM68KState *env =3D &cpu->env; =20 - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); =20 if (m68k_feature(env, M68K_FEATURE_M68040)) { env->mmu.mmusr =3D 0; @@ -558,7 +558,7 @@ raise_exception_format2(CPUM68KState *env, int tt, int = ilen, uintptr_t raddr) cs->exception_index =3D tt; =20 /* Recover PC and CC_OP for the beginning of the insn. */ - cpu_restore_state(cs, raddr, true); + cpu_restore_state(cs, raddr); =20 /* Flags are current in env->cc_*, or are undefined. */ env->cc_op =3D CC_OP_FLAGS; diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index a607fe68e5..98bdb82de8 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -277,7 +277,7 @@ void mb_cpu_do_unaligned_access(CPUState *cs, vaddr add= r, uint32_t esr, iflags; =20 /* Recover the pc and iflags from the corresponding insn_start. */ - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); iflags =3D cpu->env.iflags; =20 qemu_log_mask(CPU_LOG_INT, diff --git a/target/nios2/op_helper.c b/target/nios2/op_helper.c index 2e30d0a908..0aaf33ffc2 100644 --- a/target/nios2/op_helper.c +++ b/target/nios2/op_helper.c @@ -40,7 +40,7 @@ void nios2_cpu_loop_exit_advance(CPUNios2State *env, uint= ptr_t retaddr) * Do this here, rather than in restore_state_to_opc(), * lest we affect QEMU internal exceptions, like EXCP_DEBUG. */ - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); env->pc +=3D 4; cpu_loop_exit(cs); } diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index dde2fa1623..ec145960e3 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -45,7 +45,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong sp= r, target_ulong rb) break; =20 case TO_SPR(0, 16): /* NPC */ - cpu_restore_state(cs, GETPC(), true); + cpu_restore_state(cs, GETPC()); /* ??? Mirror or1ksim in not trashing delayed branch state when "jumping" to the current instruction. */ if (env->pc !=3D rb) { @@ -131,7 +131,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong = spr, target_ulong rb) case TO_SPR(8, 0): /* PMR */ env->pmr =3D rb; if (env->pmr & PMR_DME || env->pmr & PMR_SME) { - cpu_restore_state(cs, GETPC(), true); + cpu_restore_state(cs, GETPC()); env->pc +=3D 4; cs->halted =3D 1; raise_exception(cpu, EXCP_HALTED); diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 43f2480e94..3ded309265 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -2414,7 +2414,7 @@ void ppc_cpu_do_unaligned_access(CPUState *cs, vaddr = vaddr, uint32_t insn; =20 /* Restore state and reload the insn we executed, for filling in DSISR= . */ - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); insn =3D cpu_ldl_code(env, env->nip); =20 switch (env->mmu_model) { diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index 29ccf70df1..2cd6d062b9 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -39,7 +39,7 @@ G_NORETURN void tcg_s390_program_interrupt(CPUS390XState = *env, { CPUState *cs =3D env_cpu(env); =20 - cpu_restore_state(cs, ra, true); + cpu_restore_state(cs, ra); qemu_log_mask(CPU_LOG_INT, "program interrupt at %#" PRIx64 "\n", env->psw.addr); trigger_pgm_exception(env, code); diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index a79c838a92..532ae6b74c 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -31,7 +31,7 @@ void raise_exception_sync_internal(CPUTriCoreState *env, = uint32_t class, int tin { CPUState *cs =3D env_cpu(env); /* in case we come from a helper-call we need to restore the PC */ - cpu_restore_state(cs, pc, true); + cpu_restore_state(cs, pc); =20 /* Tin is loaded into d[15] */ env->gpr_d[15] =3D tin; diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c index e0a9caab4b..2aa9777a8e 100644 --- a/target/xtensa/helper.c +++ b/target/xtensa/helper.c @@ -253,7 +253,7 @@ void xtensa_cpu_do_unaligned_access(CPUState *cs, =20 assert(xtensa_option_enabled(env->config, XTENSA_OPTION_UNALIGNED_EXCEPTION)); - cpu_restore_state(CPU(cpu), retaddr, true); + cpu_restore_state(CPU(cpu), retaddr); HELPER(exception_cause_vaddr)(env, env->pc, LOAD_STORE_ALIGNMENT_CAUSE, addr); @@ -284,7 +284,7 @@ bool xtensa_cpu_tlb_fill(CPUState *cs, vaddr address, i= nt size, } else if (probe) { return false; } else { - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); HELPER(exception_cause_vaddr)(env, env->pc, ret, address); } } @@ -297,7 +297,7 @@ void xtensa_cpu_do_transaction_failed(CPUState *cs, hwa= ddr physaddr, vaddr addr, XtensaCPU *cpu =3D XTENSA_CPU(cs); CPUXtensaState *env =3D &cpu->env; =20 - cpu_restore_state(cs, retaddr, true); + cpu_restore_state(cs, retaddr); HELPER(exception_cause_vaddr)(env, env->pc, access_type =3D=3D MMU_INST_FETCH ? INSTR_PIF_ADDR_ERROR_CAUSE : --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666620294; cv=none; d=zohomail.com; s=zohoarc; b=FjfviIQOCrDpCFDlZGYC1de4Yu5/VdG8AQht2P2saKog7VEUUMOFoL+buMx+O0Qzpzc4hQx5cZOmtPfeLN1uzelSNSIXp1/cs4uOMccFYyzg5hzfnzsiSg9cB7Kq8+foxCQemzHzXpVSxqKGF+gf2950IVqUwqDTpr9pe9JNmB0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620294; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=f8qsMcCsQagx0RPMC3BDVQY/Bl0raSyyh0zngsEm1gg=; b=gglnYYoR01NBqUqA9Up/z3L35jJemvey/f8iaIPfzAWj6CVM6pnLduXfI4yrkFzcApiQYkfpS+U8fTIS16dlb593PLejdyh7kmJ+cAMuHhE3pa+ywLtIBCTYDCRiNfLUsMG44yEfsIgfvp/UPOKzqzNYu9A+9zn5QbaRpzHISco= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666620294120290.4367225439147; Mon, 24 Oct 2022 07:04:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxTM-0003gP-8a; Mon, 24 Oct 2022 09:26: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 1omxTE-0003b7-Ie for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:24 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxTC-0004Dt-Vy for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:26:24 -0400 Received: by mail-pg1-x531.google.com with SMTP id e129so8666114pgc.9 for ; Mon, 24 Oct 2022 06:26:22 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.26.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:26:20 -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=f8qsMcCsQagx0RPMC3BDVQY/Bl0raSyyh0zngsEm1gg=; b=IkLdm1m8k8vObCoOFbHK97HUhGpL3KJo9Dq3Doc56b7wjGiXrW1xudd1AZR2BwZzwZ 4EdSw0YbOvwmjMli10KGq+459ZSFxWjIvIaQuj85JgQuMwLJ5becRje96QpPAzvm7gy6 fNhMuBg/TLWabQ/H+lFVtCy39crHzfQILhokLoIpMm+VNrHSrIKikQJMTIHVqo0RRVr4 DdYs3aQYFIrJoZoZXClPh9K8A71xtbg0qefhF0+8DhCrVcbWEpbqy+nzBEirUcU0QTlR Vz3+3A6tbr/PgJypR+Sz1y7l8s368pvUUpAlWgqeUFaW8zFupQp4XR/WjW90/4YT8rKD aM7w== 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=f8qsMcCsQagx0RPMC3BDVQY/Bl0raSyyh0zngsEm1gg=; b=2AEEZLNWwi+ljjeqoQkUi4xeyxC899S7nnslnXPIS+THTNABD1r828kjaKLHVHi+n5 kQQwV9X5diDKe0QSKhn69oXAWf2HbnRgooEFDrrqIvZo/sLItNwIInAXYGu6KCCf/MTC l0Io+MUUdTe4G3S4n9a6wZvplULpV/7GUVnKp6SlqQB4z+bZfIU+UdAs1uWnnKpM+uhp suQWSu+qtozn17LmcGPLtkJ5nRvLL2/VTWycw1DyY6M69eO1FmP7z7Yl7urT4c1j204i 1iY4b3JYgUX/ArBRYuJOTHmXQNSE/xvieXuUEHFEuajHjHk6nOr2g6xRwZ4x84jR82dg D+tg== X-Gm-Message-State: ACrzQf3nhiU/bjAQEhP+dbA0RGMiPkdkLBUi7we5Hv6ZayQl/SHcZDli R3WaD3qNLFMxopygUgPE3FRJIJNbiQ6mMA== X-Google-Smtp-Source: AMsMyM6hpgnPJYeDKWntc5QEYQ+RYnMZkcU1wBeFsGv+wxnsilBqGPjyfVvDs/iICAycV32PdHbVpg== X-Received: by 2002:a05:6a00:16c4:b0:535:890:d4a with SMTP id l4-20020a056a0016c400b0053508900d4amr33795615pfc.0.1666617981378; Mon, 24 Oct 2022 06:26:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 29/29] accel/tcg: Remove reset_icount argument from cpu_restore_state_from_tb Date: Mon, 24 Oct 2022 23:24:59 +1000 Message-Id: <20221024132459.3229709-31-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666620295776100001 Content-Type: text/plain; charset="utf-8" The value passed is always true. Signed-off-by: Richard Henderson Reviewed-by: Claudio Fontana --- accel/tcg/translate-all.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index dd439b5e3c..9e7dd41795 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -353,12 +353,11 @@ static int cpu_unwind_data_from_tb(TranslationBlock *= tb, uintptr_t host_pc, } =20 /* - * The cpu state corresponding to 'host_pc' is restored. - * When reset_icount is true, current TB will be interrupted and - * icount should be recalculated. + * The cpu state corresponding to 'host_pc' is restored in + * preparation for exiting the TB. */ static void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, - uintptr_t host_pc, bool reset_icount) + uintptr_t host_pc) { uint64_t data[TARGET_INSN_START_WORDS]; #ifdef CONFIG_PROFILER @@ -371,7 +370,7 @@ static void cpu_restore_state_from_tb(CPUState *cpu, Tr= anslationBlock *tb, return; } =20 - if (reset_icount && (tb_cflags(tb) & CF_USE_ICOUNT)) { + if (tb_cflags(tb) & CF_USE_ICOUNT) { assert(icount_enabled()); /* * Reset the cycle counter to the start of the block and @@ -404,7 +403,7 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc) if (in_code_gen_buffer((const void *)(host_pc - tcg_splitwx_diff))) { TranslationBlock *tb =3D tcg_tb_lookup(host_pc); if (tb) { - cpu_restore_state_from_tb(cpu, tb, host_pc, true); + cpu_restore_state_from_tb(cpu, tb, host_pc); return true; } } @@ -1715,7 +1714,7 @@ tb_invalidate_phys_page_range__locked(struct page_col= lection *pages, * restore the CPU state. */ current_tb_modified =3D true; - cpu_restore_state_from_tb(cpu, current_tb, retaddr, true); + cpu_restore_state_from_tb(cpu, current_tb, retaddr); cpu_get_tb_cpu_state(env, ¤t_pc, ¤t_cs_base, ¤t_flags); } @@ -1874,7 +1873,7 @@ static bool tb_invalidate_phys_page(tb_page_addr_t ad= dr, uintptr_t pc) restore the CPU state */ =20 current_tb_modified =3D 1; - cpu_restore_state_from_tb(cpu, current_tb, pc, true); + cpu_restore_state_from_tb(cpu, current_tb, pc); cpu_get_tb_cpu_state(env, ¤t_pc, ¤t_cs_base, ¤t_flags); } @@ -1904,7 +1903,7 @@ void tb_check_watchpoint(CPUState *cpu, uintptr_t ret= addr) tb =3D tcg_tb_lookup(retaddr); if (tb) { /* We can use retranslation to find the PC. */ - cpu_restore_state_from_tb(cpu, tb, retaddr, true); + cpu_restore_state_from_tb(cpu, tb, retaddr); tb_phys_invalidate(tb, -1); } else { /* The exception probably happened in a helper. The CPU state sho= uld @@ -1940,7 +1939,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retadd= r) cpu_abort(cpu, "cpu_io_recompile: could not find TB for pc=3D%p", (void *)retaddr); } - cpu_restore_state_from_tb(cpu, tb, retaddr, true); + cpu_restore_state_from_tb(cpu, tb, retaddr); =20 /* * Some guests must re-execute the branch when re-executing a delay --=20 2.34.1 From nobody Sat May 18 10:48:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666620878; cv=none; d=zohomail.com; s=zohoarc; b=WzNdMites6iCXuOLfHZetb10hPr3lc9QSDQhLhLtQFSxgxVxS0xWPI/OmvFEzazZv4xEP2O4a+mIs20JDKWWAUIEj7kCQeGd9CzopRU0d+PUShh6528WINP92Lf55K2NI0H/OJlaK8DEUWAn9Wt7AGOwPKwXmhMhpRGNAo5dI58= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666620878; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kp9LhfiuTjCmNa2oeYI903Zjr+KKaYkdyPt5aXd4y5k=; b=FW4Fx/ZhQ36wpsClmV4IsOR0g3g0MKTINg9YW7f1vRupsqVj/Msx3MNkpujuG6heEz0hQbLph0mwPET9f/Tp/Cxc1MLQoK7+/wqSKHQqoTGoG5BojudnvYRtJqhiNpRAPZghWqtwUumxHfU/rGJ1IjaOGIDuJgcWzLDlrmupGY8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1666620878910906.3937527204889; Mon, 24 Oct 2022 07:14:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1omxSJ-0003E7-HO; Mon, 24 Oct 2022 09:25:27 -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-0003Ao-Qk for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:22 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omxS9-0003s1-HA for qemu-devel@nongnu.org; Mon, 24 Oct 2022 09:25:22 -0400 Received: by mail-pg1-x52a.google.com with SMTP id f9so4279124pgj.2 for ; Mon, 24 Oct 2022 06:25:15 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id b12-20020a1709027e0c00b00178ab008364sm17009216plm.37.2022.10.24.06.25.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 06:25:14 -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=kp9LhfiuTjCmNa2oeYI903Zjr+KKaYkdyPt5aXd4y5k=; b=drBwzOMzv4NaVk3IbLYWl9TOEMQRyBsd6/pdSeCDbVi94/Sci3QaRclVGg3QmTvhme Fbycm9ol0Y37h8MGYmK+bQdkiyir6hein86YAGjEyoErGfsPajoWe3I+hdMEbjLMT929 pIP+C3nUb/EOhFNG4dW/GNgwhCKkbj00KfTZK1yfCNpdUEPqquJ5IgP4CzDTw42AybPo MdAN9/33v9qfSau9yR1qbgW3/w3ZxaUWfmuB46rGuRl6GSyn130evPb1lI0WiLZZhHuv HKx3Kh7iQD7HlTgyMYTIc9YxvTsAJwZgUHw/nAaDv0j4ZOgAn3aAZ2LQcnyk688gLL3H b/aQ== 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=kp9LhfiuTjCmNa2oeYI903Zjr+KKaYkdyPt5aXd4y5k=; b=wIMpM0IHVRTju2ogZRklIYAxLYc9ZU+gmNE9WT7FinUYhrdnISbPaOkilhavdZ1iDX ReXIpYJapYfI5o7DgvAYQHH1RBsgVhY9Utoxj1++WmB+jQomDn+MDQnm9RsF9fDHonBa 3XgHQvubbG37IIiUkP/i9XM2egUStH6IDv3bHoID5ueN1YVWzVQyM0Bp2lq8RdEwRTJ2 YtZsPBcbQsdmJNROz1FRm0+57fBeLqA0iDUSI0eS5jfCBP+3jx3E+U8k+6cG94HKzVCe bSZOWSLkMfx3edz57nZeqgNa86ilTHz6RUBtFO5KG4YiS6xG9WYHtcI357PUgQdKYH2G Se2Q== X-Gm-Message-State: ACrzQf1JzeZ+qRDT9a4EzxkDy/AsolI87SEgxyWDeS8qOaaFERKVr4UG KrVdHAbY1O3Hp5mEf5bbIJYpKHMIhJqlOQ== X-Google-Smtp-Source: AMsMyM7MMABIZ4EmDokCZWpjfCwjFn4AFrEBKTbi7gNH30wIxdx6hRRVc0X27gk8XY1w9bLeZCYbIw== X-Received: by 2002:a65:6bd3:0:b0:42b:9117:b9d1 with SMTP id e19-20020a656bd3000000b0042b9117b9d1mr28067014pgw.238.1666617914720; Mon, 24 Oct 2022 06:25:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld Date: Mon, 24 Oct 2022 23:24:31 +1000 Message-Id: <20221024132459.3229709-3-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 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666620879519100003 Content-Type: text/plain; charset="utf-8" More closely follow the default linker script for nios2. This magically fixes a problem resolving .got relocs from the toolchain's libgcc.a. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1258 Signed-off-by: Richard Henderson --- tests/tcg/nios2/10m50-ghrd.ld | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/tcg/nios2/10m50-ghrd.ld b/tests/tcg/nios2/10m50-ghrd.ld index 7db0d59ad7..71cdda450c 100644 --- a/tests/tcg/nios2/10m50-ghrd.ld +++ b/tests/tcg/nios2/10m50-ghrd.ld @@ -44,11 +44,15 @@ SECTIONS .data : ALIGN(4) { *(.shdata) *(.data .data.* .gnu.linkonce.d.*) - . =3D ALIGN(4); - _gp =3D ABSOLUTE(. + 0x8000); - *(.got.plt) *(.got) - *(.lit8) - *(.lit4) + } >ram :RAM + + HIDDEN (_gp =3D ALIGN(16) + 0x7ff0); + PROVIDE_HIDDEN (gp =3D _gp); + .got : ALIGN(4) { + *(.got.plt) *(.igot.plt) *(.got) *(.igot) + } >ram :RAM + + .sdata : ALIGN(4) { *(.sdata .sdata.* .gnu.linkonce.s.*) } >ram :RAM =20 --=20 2.34.1