target/arm: Ignore PMCR.D when PMCR.LC is set
commitb57aa7bdc3b4f16b216bd854e86431146729a640
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 22 Aug 2022 13:23:52 +0000 (22 14:23 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 14 Sep 2022 10:19:40 +0000 (14 11:19 +0100)
tree8b63275c81b01de9f43bfd8e64ffa183a17c6b91
parent01765386a88868ae993bcbb39f111501fe690035
target/arm: Ignore PMCR.D when PMCR.LC is set

The architecture requires that if PMCR.LC is set (for a 64-bit cycle
counter) then PMCR.D (which enables the clock divider so the counter
ticks every 64 cycles rather than every cycle) should be ignored.  We
were always honouring PMCR.D; fix the bug so we correctly ignore it
in this situation.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220822132358.3524971-5-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/arm/helper.c