qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v11 26/55] target/arm: split a15 cpu model and 32bit class func


From: Richard Henderson
Subject: Re: [RFC v11 26/55] target/arm: split a15 cpu model and 32bit class functions to cpu32.c
Date: Wed, 24 Mar 2021 16:17:59 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/23/21 9:46 AM, Claudio Fontana wrote:
-static void arm_cpu_dump_state(CPUState *cs, FILE *f, int flags)
-{
-    ARMCPU *cpu = ARM_CPU(cs);
-    CPUARMState *env = &cpu->env;
-    int i;
-
-    if (is_a64(env)) {
-        aarch64_cpu_dump_state(cs, f, flags);
-        return;
-    }

You've lost this bit.

Somewhere there needs to be a check of the current cpu state, and one of the two functions must be called.


@@ -823,6 +951,7 @@ static void aarch64_cpu_class_init(ObjectClass *oc, void 
*data)
     cc->gdb_num_core_regs = 34;
     cc->gdb_core_xml_file = "aarch64-core.xml";
     cc->gdb_arch_name = aarch64_gdb_arch_name;
+    cc->dump_state = aarch64_cpu_dump_state;

I suggest this continue to set arm_cpu_dump_state, like so,

static void arm_cpu_dump_state(CPUState *cs, FILE *f, int flags)
{
    if (is_a64(env)) {
        aarch64_cpu_dump_state(cs, f, flags);
    } else {
        aarch32_cpu_dump_state(cs, f, flags);
    }
}


r~



reply via email to

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