On 08/02/2017 02:59 AM, James Hogan wrote:
RDHWR CC reads the CPU timer like MFC0 CP0_Count, so with icount enabled
it must set can_do_io while it calls the helper to avoid the "Bad icount
read" error. It should also break out of the translation loop to ensure
that timer interrupts are immediately handled.
Fixes: 2e70f6efa8b9 ("Add instruction counter.")
Signed-off-by: James Hogan<james.ho...@imgtec.com>
Cc: Aurelien Jarno<aurel...@aurel32.net>
Cc: Yongbok Kim<yongbok....@imgtec.com>
---
I've based this on MFC0 Count, but this instruction is also available to
usermode (e.g. CONFIG_USER_ONLY), which I presume is still fine.
---
target/mips/translate.c | 11 +++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)
Reviewed-by: Richard Henderson <r...@twiddle.net>
r~