Re: [PATCH] target/riscv: rvzicbo: Fixup CBO extension register calculation

2024-06-04 Thread Philippe Mathieu-Daudé
On 4/6/24 10:32, Philippe Mathieu-Daudé wrote: On 16/5/24 07:09, Alistair Francis wrote: On Tue, May 14, 2024 at 7:11 PM Daniel Henrique Barboza wrote: On 5/13/24 23:39, Alistair Francis wrote: When running the instruction ```   cbo.flush 0(x0) ``` QEMU would segfault. The issue was

Re: [PATCH] target/riscv: rvzicbo: Fixup CBO extension register calculation

2024-06-04 Thread Philippe Mathieu-Daudé
On 16/5/24 07:09, Alistair Francis wrote: On Tue, May 14, 2024 at 7:11 PM Daniel Henrique Barboza wrote: On 5/13/24 23:39, Alistair Francis wrote: When running the instruction ``` cbo.flush 0(x0) ``` QEMU would segfault. The issue was in cpu_gpr[a->rs1] as QEMU does not have cpu_gp

Re: [PATCH] target/riscv: rvzicbo: Fixup CBO extension register calculation

2024-05-15 Thread Alistair Francis
On Tue, May 14, 2024 at 7:11 PM Daniel Henrique Barboza wrote: > > > > On 5/13/24 23:39, Alistair Francis wrote: > > When running the instruction > > > > ``` > > cbo.flush 0(x0) > > ``` > > > > QEMU would segfault. > > > > The issue was in cpu_gpr[a->rs1] as QEMU does not have cpu_gpr[0] > >

Re: [PATCH] target/riscv: rvzicbo: Fixup CBO extension register calculation

2024-05-14 Thread Daniel Henrique Barboza
On 5/13/24 23:39, Alistair Francis wrote: When running the instruction ``` cbo.flush 0(x0) ``` QEMU would segfault. The issue was in cpu_gpr[a->rs1] as QEMU does not have cpu_gpr[0] allocated. In order to fix this let's use the existing get_address() helper. This also has the benefit

Re: [PATCH] target/riscv: rvzicbo: Fixup CBO extension register calculation

2024-05-14 Thread Richard Henderson
On 5/14/24 04:39, Alistair Francis wrote: When running the instruction ``` cbo.flush 0(x0) ``` QEMU would segfault. The issue was in cpu_gpr[a->rs1] as QEMU does not have cpu_gpr[0] allocated. In order to fix this let's use the existing get_address() helper. This also has the benefit of

[PATCH] target/riscv: rvzicbo: Fixup CBO extension register calculation

2024-05-13 Thread Alistair Francis
When running the instruction ``` cbo.flush 0(x0) ``` QEMU would segfault. The issue was in cpu_gpr[a->rs1] as QEMU does not have cpu_gpr[0] allocated. In order to fix this let's use the existing get_address() helper. This also has the benefit of performing pointer mask calculations on the a