Re: [PATCH v3 09/33] target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state common

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

 



On 5/1/25 12:06 PM, Philippe Mathieu-Daudé wrote:
Missing the "Why?". Answer, because it is guarded by is_a64().


We are guaranteed it was not used because the whole definition is under TARGET_AARCH64 (and not only the code inside the function). If it was called before, out of this target, it would have triggered a g_assert_not_reached().

As well, yes, it's guarded by is_a64(env).
I'll update description with this.

Should we assert on is_a64() on entry?


I don't think so, from the reason above 'If it was called before'.

On 1/5/25 08:23, Pierrick Bouvier wrote:
Reviewed-by: Richard Henderson <richard.henderson@xxxxxxxxxx>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@xxxxxxxxxx>
---
   target/arm/cpu.c | 11 -----------
   1 file changed, 11 deletions(-)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 37b11e8866f..00ae2778058 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1183,8 +1183,6 @@ static void arm_disas_set_info(CPUState *cpu, disassemble_info *info)
   #endif
   }
-#ifdef TARGET_AARCH64
-
   static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags)
   {
       ARMCPU *cpu = ARM_CPU(cs);
@@ -1342,15 +1340,6 @@ static void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags)
       }
   }
-#else
-
-static inline void aarch64_cpu_dump_state(CPUState *cs, FILE *f, int flags)
-{
-    g_assert_not_reached();
-}
-
-#endif
-
   static void arm_cpu_dump_state(CPUState *cs, FILE *f, int flags)
   {
       ARMCPU *cpu = ARM_CPU(cs);






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux