qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 22/27] target/arm: Move hflags code into the tcg director


From: Richard Henderson
Subject: Re: [RFC PATCH 22/27] target/arm: Move hflags code into the tcg directory
Date: Wed, 4 Jan 2023 21:09:10 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 1/4/23 13:58, Fabiano Rosas wrote:
@@ -25,6 +25,7 @@
  #include "qemu/config-file.h"
  #include "qemu/option.h"
  #include "qemu/units.h"
+#include "sysemu/tcg.h"
/* Kernel boot protocol is specified in the kernel docs
   * Documentation/arm/Booting and Documentation/arm64/booting.txt
@@ -827,7 +828,9 @@ static void do_cpu_reset(void *opaque)
                  info->secondary_cpu_reset_hook(cpu, info);
              }
          }
-        arm_rebuild_hflags(env);
+        if (tcg_enabled()) {
+            arm_rebuild_hflags(env);
+        }

We certainly are adding lots of wrapping for this function.
Should we handle it just once in a header instead?

--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -241,7 +241,7 @@ int sme_exception_el(CPUARMState *env, int el)
  }
/* This corresponds to the ARM pseudocode function IsFullA64Enabled(). */
-static bool sme_fa64(CPUARMState *env, int el)
+bool sme_fa64(CPUARMState *env, int el)

This function should be moved as well, as it's only used by hflags.

@@ -25,3 +26,12 @@ void arm_reset_sve_state(CPUARMState *env)
  {
      g_assert_not_reached();
  }
+
+void arm_rebuild_hflags(CPUARMState *env)
+{
+    g_assert_not_reached();
+}
+
+void assert_hflags_rebuild_correctly(CPUARMState *env)
+{
+}

Do we really need these? I would expect the tcg_enabled() test to dead-code-eliminate the calls...



r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]