Re: [PATCH v2 10/15] target/riscv: Add a riscv_cpu_is_32bit() helper function

2020-12-09 Thread Alistair Francis
On Wed, Dec 9, 2020 at 7:59 AM Richard Henderson wrote: > > On 12/8/20 4:56 PM, Alistair Francis wrote: > > +bool riscv_cpu_is_32bit(CPURISCVState *env) > > +{ > > +if (env->misa & RV64) { > > +return false; > > +} > > + > > +return true; > > Is this ever going to more than > >

Re: [PATCH v2 10/15] target/riscv: Add a riscv_cpu_is_32bit() helper function

2020-12-09 Thread Richard Henderson
On 12/8/20 4:56 PM, Alistair Francis wrote: > +bool riscv_cpu_is_32bit(CPURISCVState *env) > +{ > +if (env->misa & RV64) { > +return false; > +} > + > +return true; Is this ever going to more than return !(env->misa & RV64); ? r~

[PATCH v2 10/15] target/riscv: Add a riscv_cpu_is_32bit() helper function

2020-12-08 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Tested-by: Bin Meng --- target/riscv/cpu.h | 2 ++ target/riscv/cpu.c | 9 + 2 files changed, 11 insertions(+) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 9c064f3094..6339e84819 100644 --- a/target/riscv/cpu.h +++ b/t