From nobody Wed Apr 16 22:45:53 2025 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=1666750658; cv=none; d=zohomail.com; s=zohoarc; b=JpJh4raU6ULmabmclyy1j2gtA5G/ekclNGNCNW93PBSLoPE9Tw/3m+T3c7Z2T4VMAcE0DQnxcTcMBKyMUYne6ee4UurfUWqcauxd37bg5oQNvevZj3KdoY3FQqAXn5P/vpX2f4tFZc4Giy9C3PmtBVDVi+VmY2L5ibV+tPR1Wtk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666750658; h=Content-Type:Content-Transfer-Encoding:Cc: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=ivVGdg8T3tgMGN4Yqz/msc0BdoDhOdnaWJxKNMe3heo=; b=HOlcZyPEoNJ4loO3GvzYunCM86dLI203anFxrYCLhmOK5ej3Y1Bz52/1j3ZuhrRpXjQBz5nMCHgUucoSNYq9aucrGzySLAYFtDoP4Lhgm08q+ij15ZLXE1oWHrfstQ1up3SRd6l/dD5yS+oApAtsAR/0OvO8h0yimnddyEJ5t9I= 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 1666750658129809.8716276280352; Tue, 25 Oct 2022 19:17:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onVuX-0005KM-5K; Tue, 25 Oct 2022 22:12:53 -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 1onVuW-0005KF-Fc for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:12:52 -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 1onVuU-0001Hi-Qh for qemu-devel@nongnu.org; Tue, 25 Oct 2022 22:12:52 -0400 Received: by mail-pf1-x42d.google.com with SMTP id i3so13858017pfc.11 for ; Tue, 25 Oct 2022 19:12:50 -0700 (PDT) Received: from stoup.hotspotlogin.services ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id o29-20020a635d5d000000b0043c9da02729sm1897833pgm.6.2022.10.25.19.12.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 19:12:49 -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:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ivVGdg8T3tgMGN4Yqz/msc0BdoDhOdnaWJxKNMe3heo=; b=DZ5aVSKb9vLS+xsX+MmgygCHujSeCsnvwC3HqQ4FVyqMoi2QyMAeyQoOgXsfysIbv8 0/sX8KYoIPOMCzztchPHK/l5CCtO3DAsI5rR9ayL2hE+maLm1QScOajgQGIZNTaf6IdQ JIh4JfEKz3AP3kmjaJA6V+/gtnfzJ+6wsj7nPoiIjvROIJoM1E1lAEBtTpUjkBafqXIw Hq5zSw8vqx8BQQ25KOk0/TguRu+/uR5kXTQQd/Z1Suv6eT57Qlbz4d2y803AyOeuk+n0 zgzjytSbbkhRSX4q1VwTrUnsLGmFrIUJbJve9rXFVxWYIzejYUMOyoMhAcapu2xZG4eq oLuQ== 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:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ivVGdg8T3tgMGN4Yqz/msc0BdoDhOdnaWJxKNMe3heo=; b=HISjnoma/dHgPZRn0buA44GnUVz4PIqyTic1KHSIGJI9k593N5sMZyjFhAWafv973+ MqaqDQKaz/XAnE1YHKsl5hggJvl1iHWIJ+GvJWlmM13RqdfS4k6PRL7eyXDWhpZzbCGQ a41DfX/b19llTNnQi4g++5RZV3gxp2mmYgWd11OYjo8DvxqV2SHaWPJGYZbAKApP+3zT 57qBoDEPqvQYBObH/7bdODHkxBWJOR+5TBhpDQvjnEvBmGAZmdJkjleX+OoMnxdA+IOO lYNEkn6CrJubBUM/XBCC+U/vVi+WxtJZwoyPT9JcoSC1TEIAbgjdTrLG5Ajdg3D31A0+ AcEg== X-Gm-Message-State: ACrzQf3Ux7HypBrwArolUkwenMPt78SkOWV0atkCslZZRJhTEevKcdii EcOQc56MdvglY0dKaps8KLpfqdIWspxDRgm9 X-Google-Smtp-Source: AMsMyM5NkIVC6JFCDFnF9vTNeBa2l7u8/Qqj8OVdoTWZZFtTXY6IR399Wf5f1g/3VVP4yqrBBXzLSg== X-Received: by 2002:a63:171b:0:b0:438:e47d:e79b with SMTP id x27-20020a63171b000000b00438e47de79bmr34716697pgl.542.1666750369504; Tue, 25 Oct 2022 19:12:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 31/47] target/hppa: Convert to tcg_ops restore_state_to_opc Date: Wed, 26 Oct 2022 12:11:00 +1000 Message-Id: <20221026021116.1988449-32-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221026021116.1988449-1-richard.henderson@linaro.org> References: <20221026021116.1988449-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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: 1666750658899100001 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- 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