qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 01/12] target/riscv: add 'vlenb' field in cpu->cfg


From: Richard Henderson
Subject: Re: [PATCH v2 01/12] target/riscv: add 'vlenb' field in cpu->cfg
Date: Tue, 16 Jan 2024 09:33:54 +1100
User-agent: Mozilla Thunderbird

On 1/16/24 09:25, Daniel Henrique Barboza wrote:
Our usage of 'vlenb' is overwhelming superior than the use of 'vlen'.
We're using 'vlenb' most of the time, having to do 'vlen >> 3' or
'vlen / 8' in every instance.

In hindsight we would be better if the 'vlenb' property  was introduced
instead of 'vlen'. That's not what happened, and now we can't easily get
rid of it due to user scripts all around. What we can do, however, is to
change our internal representation to use 'vlenb'.

Add a 'vlenb' field in cpu->cfg. It'll be set via the existing 'vlen'
property, i.e. setting 'vlen' will also set 'vlenb'.

We'll replace all 'vlen >> 3' code to use 'vlenb' directly. Start with
the single instance we have in target/riscv/cpu.c.

Signed-off-by: Daniel Henrique Barboza<dbarboza@ventanamicro.com>
---
  target/riscv/cpu.c     | 4 +++-
  target/riscv/cpu_cfg.h | 1 +
  2 files changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]