Re: [PATCH v2] target/riscv: Use official extension names for AIA CSRs

2022-08-19 Thread Anup Patel
On Fri, Aug 19, 2022 at 8:40 PM Richard Henderson wrote: > > On 8/19/22 00:31, Anup Patel wrote: > > static int aia_hmode(CPURISCVState *env, int csrno) > > { > > -if (!riscv_feature(env, RISCV_FEATURE_AIA)) { > > +CPUState *cs = env_cpu(env); > > +RISCVCPU *cpu = RISCV_CPU(cs); >

Re: [PATCH v2] target/riscv: Use official extension names for AIA CSRs

2022-08-19 Thread Richard Henderson
On 8/19/22 00:31, Anup Patel wrote: static int aia_hmode(CPURISCVState *env, int csrno) { -if (!riscv_feature(env, RISCV_FEATURE_AIA)) { +CPUState *cs = env_cpu(env); +RISCVCPU *cpu = RISCV_CPU(cs); Better as RISCVCPU *cpu = env_archcpu(env); r~

[PATCH v2] target/riscv: Use official extension names for AIA CSRs

2022-08-19 Thread Anup Patel
The arch review of AIA spec is completed and we now have official extension names for AIA: Smaia (M-mode AIA CSRs) and Ssaia (S-mode AIA CSRs). Refer, section 1.6 of the latest AIA v0.3.1 stable specification at