Re: [PATCH v3 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-05 Thread Deepak Gupta
On Fri, Jan 05, 2024 at 10:33:40AM +0300, Alexey Baturo wrote: I think you're right, thanks. I'll add a check for M-mode as well and I guess I'll have to rename the function. Any ideas on the proper and self-describing name? Since all we care for is whether virtual memory is enabled and in effe

Re: [PATCH v3 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-04 Thread Alexey Baturo
I think you're right, thanks. I'll add a check for M-mode as well and I guess I'll have to rename the function. Any ideas on the proper and self-describing name? Thanks пт, 5 янв. 2024 г. в 03:46, Deepak Gupta : > On Wed, Jan 3, 2024 at 10:59 AM Alexey Baturo > wrote: > > + > > +bool riscv_cpu_

Re: [PATCH v3 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-04 Thread Deepak Gupta
On Wed, Jan 3, 2024 at 10:59 AM Alexey Baturo wrote: > + > +bool riscv_cpu_bare_mode(CPURISCVState *env) > +{ > +int satp_mode = 0; > +#ifndef CONFIG_USER_ONLY > +if (riscv_cpu_mxl(env) == MXL_RV32) { > +satp_mode = get_field(env->satp, SATP32_MODE); > +} else { > +satp

[PATCH v3 3/6] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-01-03 Thread Alexey Baturo
From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/cpu.h| 4 +++ target/riscv/cpu_helper.c | 54 +++ 2 files changed, 58 insertions(+) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index bd379ee653..c607a94bba 100644 --- a/targ