From patchwork Wed Oct 26 02:11:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 618759 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp112419pvb; Tue, 25 Oct 2022 19:17:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jp85DFKO3o2uj6I1A+AgiNV2pZTk07pYn5M+CxWav9T8gizbl0DHg0AtSBaTi6Fpuz3vw X-Received: by 2002:ac8:5d93:0:b0:398:3709:945c with SMTP id d19-20020ac85d93000000b003983709945cmr34290165qtx.459.1666750657921; Tue, 25 Oct 2022 19:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666750657; cv=none; d=google.com; s=arc-20160816; b=d1HpqRqUBqG7gwjMrSlnRdu9WA9oXu2rRGZh/Eb9jqDLxybVhealaDJ068xhbEJc5l AONROKwL/Gtd7Kcvvlt822HStaRSWDe8OBzXtLm6sZnepkpqkdOXDDhkGjsz+xK8L6sI LB/7kXyrLpTy8+bARhwCvta5GkYB2OtffWagXN64iomBzlaAS8yq22hADL+OQlAz4rDx PQmv+iuuj+fgJ1Kzj2bJKg+dMThzizk/dsnyHA1rTMd0KWz+c964NxMiADKn5d+QtR+9 ohQGupIKV+ry7Ln1SRJcjXT73bd/k7ILCJpz6rD0EDEGZcJWlvzpLb5DZ8W3ov1IY/mW TW4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ivVGdg8T3tgMGN4Yqz/msc0BdoDhOdnaWJxKNMe3heo=; b=PWrooOE8x30S7Pg0sy3YF0cIhAnhlAOIMS/gUL6vyvZU1iY2b+d+8rOEd+8Xl+b7Ln gD9Ur2v9kiQ49QPQLZI5xg24Dvt7FzQRUPlfSd7ik8auEqo4GAn11O+RS3JTRti9V+/c pLibNJL4jfY8kGgq7IdjYXr/u4Ep8JX6q+rtOdaBxvvHCnLBDsG6/ro5/adBORaabyI/ 8e6+bOS9C3JH1ioT5ZXYkconA0+IKta8LHPx5N1fSCnxOhx8MvXjC0e3C6EyVMj9Pwo7 LCcJV50COPPHp7JJtDdvVPRFyzSLh6nMoKgS6lpDJthnOtOcwljXFeYBPQisc45TyJii q9kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DZ5aVSKb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n23-20020ac86757000000b0035cee3c2131si2592876qtp.334.2022.10.25.19.17.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Oct 2022 19:17:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DZ5aVSKb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 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) 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-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) 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) From: Richard Henderson To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-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 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+patch=linaro.org@nongnu.org Reviewed-by: Philippe Mathieu-Daudé 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 = (tb->flags & PSW_N) != 0; } +static void hppa_restore_state_to_opc(CPUState *cs, + const TranslationBlock *tb, + const uint64_t *data) +{ + HPPACPU *cpu = HPPA_CPU(cs); + + cpu->env.iaoq_f = data[0]; + if (data[1] != (target_ureg)-1) { + cpu->env.iaoq_b = 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 = 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 = { static const struct TCGCPUOps hppa_tcg_ops = { .initialize = hppa_translate_init, .synchronize_from_tb = hppa_cpu_synchronize_from_tb, + .restore_state_to_opc = hppa_restore_state_to_opc, #ifndef CONFIG_USER_ONLY .tlb_fill = 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, TranslationBlock *tb, int max_insns, DisasContext ctx; translator_loop(cs, tb, max_insns, pc, host_pc, &hppa_tr_ops, &ctx.base); } - -void restore_state_to_opc(CPUHPPAState *env, TranslationBlock *tb, - target_ulong *data) -{ - env->iaoq_f = data[0]; - if (data[1] != (target_ureg)-1) { - env->iaoq_b = 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 = 0; -}