On 2025-10-27 19:18, Anton Johansson wrote:
According to version 20250508 of the privileged specification,
mhpmeventn is 64 bits in size and mhpmeventnh is only ever used
when XLEN == 32 and accesses the top 32 bits of the 64-bit
mhpmeventn registers. Combine the two arrays of target_ulong
mhpmeventh[] and mhpmevent[] to a single array of uint64_t.

This also allows for some minor code simplification where branches
handling either mhpmeventh[] or mhpmevent[] could be combined.

Signed-off-by: Anton Johansson <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
---
  target/riscv/cpu.h     | 10 +++----
  target/riscv/csr.c     | 67 +++++++++++++++---------------------------
  target/riscv/machine.c |  3 +-
  target/riscv/pmu.c     | 53 ++++++++-------------------------
  4 files changed, 42 insertions(+), 91 deletions(-)

Reviewed-by: Pierrick Bouvier <[email protected]>


Reply via email to