]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv: Simplify counter predicate function
authorAtish Patra <atishp@rivosinc.com>
Wed, 24 Aug 2022 22:16:58 +0000 (15:16 -0700)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 7 Sep 2022 07:19:15 +0000 (09:19 +0200)
commitade445ef85aa0cf711a311132cb458f11f6a6d12
treea30b72aaefc423cc480e7fb95927fce528631e30
parent14664483457b21235be42fbfb534e5ea881508b8
target/riscv: Simplify counter predicate function

All the hpmcounters and the fixed counters (CY, IR, TM) can be represented
as a unified counter. Thus, the predicate function doesn't need handle each
case separately.

Simplify the predicate function so that we just handle things differently
between RV32/RV64 and S/HS mode.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Message-Id: <20220824221701.41932-3-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/csr.c