|
From: | Richard Henderson |
Subject: | Re: [PATCH v3 25/43] target/loongarch: Add LoongArch CSR instruction |
Date: | Sat, 30 Apr 2022 10:22:18 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 4/29/22 03:07, Xiaojuan Yang wrote:
+ [LOONGARCH_CSR_CPUID] = { + .offset = -1, + .flags = CSRFL_READONLY, + .readfn = gen_helper_csrrd_cpuid, + .writefn = NULL + },
The offset should be (int)offsetof(CPUState, cpu_index) - (int)offsetof(LoongArchCPU, env) at which point you don't need the readfn.
+target_ulong helper_csrrd_tval(CPULoongArchState *env) +{ + LoongArchCPU *cpu = LOONGARCH_CPU(env_cpu(env));
cpu = env_archcpu(env). Several other instances in the file. Otherwise it looks good. r~
[Prev in Thread] | Current Thread | [Next in Thread] |