qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
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	[thread overview]
Message-ID: <20221024132459.3229709-9-richard.henderson@linaro.org> (raw)
In-Reply-To: <20221024132459.3229709-1-richard.henderson@linaro.org>

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 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;
-}
-- 
2.34.1



  parent reply	other threads:[~2022-10-24 13:37 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 13:24 [PATCH 00/29] tcg: Fix x86 TARGET_TB_PCREL (#1269) Richard Henderson
2022-10-24 13:24 ` [PATCH 01/29] accel/tcg: Add restore_state_to_opc to TCGCPUOps Richard Henderson
2022-10-24 15:05   ` Claudio Fontana
2022-10-24 15:15     ` Richard Henderson
2022-10-25  8:41       ` Claudio Fontana
2022-10-24 13:24 ` [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld Richard Henderson
2022-10-25  9:12   ` Claudio Fontana
2022-10-24 13:24 ` [PATCH 02/29] target/alpha: Convert to tcg_ops restore_state_to_opc Richard Henderson
2022-10-24 15:08   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 03/29] target/arm: " Richard Henderson
2022-10-24 14:27   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 04/29] target/avr: " Richard Henderson
2022-10-24 14:01   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 05/29] target/cris: " Richard Henderson
2022-10-24 14:58   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 06/29] target/hexagon: " Richard Henderson
2022-10-24 14:27   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` Richard Henderson [this message]
2022-10-24 14:02   ` [PATCH 07/29] target/hppa: " Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 08/29] target/i386: " Richard Henderson
2022-10-24 14:59   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 09/29] target/loongarch: " Richard Henderson
2022-10-24 14:59   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 10/29] target/m68k: " Richard Henderson
2022-10-24 17:55   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 11/29] target/microblaze: " Richard Henderson
2022-10-24 17:56   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 12/29] target/mips: " Richard Henderson
2022-10-24 14:02   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 13/29] target/nios2: " Richard Henderson
2022-10-24 14:03   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 14/29] target/openrisc: " Richard Henderson
2022-10-24 15:00   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 15/29] target/ppc: " Richard Henderson
2022-10-24 17:56   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 16/29] target/riscv: " Richard Henderson
2022-10-24 14:03   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 17/29] target/rx: " Richard Henderson
2022-10-24 14:03   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 18/29] target/s390x: " Richard Henderson
2022-10-24 14:05   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 19/29] target/sh4: " Richard Henderson
2022-10-24 14:04   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 20/29] target/sparc: " Richard Henderson
2022-10-24 14:07   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 21/29] target/tricore: " Richard Henderson
2022-10-24 14:04   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 22/29] target/xtensa: " Richard Henderson
2022-10-24 17:56   ` Philippe Mathieu-Daudé
2022-10-24 13:24 ` [PATCH 23/29] accel/tcg: Remove restore_state_to_opc function Richard Henderson
2022-10-25  8:56   ` Claudio Fontana
2022-10-24 13:24 ` [PATCH 24/29] accel/tcg: Introduce cpu_unwind_state_data Richard Henderson
2022-10-25  9:23   ` Claudio Fontana
2022-10-25  9:32     ` Claudio Fontana
2022-10-25 23:08     ` Richard Henderson
2022-10-24 13:24 ` [PATCH 25/29] target/i386: Use cpu_unwind_state_data for tpr access Richard Henderson
2022-10-24 13:24 ` [PATCH 26/29] target/openrisc: Always exit after mtspr npc Richard Henderson
2022-10-25 15:39   ` Philippe Mathieu-Daudé
2022-10-25 15:49     ` Richard Henderson
2022-10-24 13:24 ` [PATCH 27/29] target/openrisc: Use cpu_unwind_state_data for mfspr Richard Henderson
2022-10-24 13:24 ` [PATCH 28/29] accel/tcg: Remove will_exit argument from cpu_restore_state Richard Henderson
2022-10-25 13:00   ` Claudio Fontana
2022-10-24 13:24 ` [PATCH 29/29] accel/tcg: Remove reset_icount argument from cpu_restore_state_from_tb Richard Henderson
2022-10-25 13:09   ` Claudio Fontana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221024132459.3229709-9-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).