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: Claudio Fontana
Subject: Re: [RFC v11 26/55] target/arm: split a15 cpu model and 32bit class functions to cpu32.c
Date: Thu, 25 Mar 2021 15:30:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

On 3/24/21 11:17 PM, Richard Henderson wrote:
> 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.


Thanks for the nice catch, I got confused there.

> 
> 
>> @@ -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]