OSDN Git Service

target/mips: Move cpu_mips_get_random() with CP0 helpers
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 12 Oct 2020 09:57:48 +0000 (11:57 +0200)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sat, 17 Oct 2020 09:13:15 +0000 (11:13 +0200)
commit2dc29222a6f7c87300c1a7e1982e11422d34595e
tree2c1faf1dc625d2d038a828b5b081fd3e9838f68f
parent88a844545e0fb1fa95a55888fb31024fcfc9720b
target/mips: Move cpu_mips_get_random() with CP0 helpers

The get_random() helper uses the CP0_Wired register, which is
unrelated to the CP0_Count register used as timer.
Commit e16fe40c872 ("Move the MIPS CPU timer in a separate file")
incorrectly moved this get_random() helper with timer specific
code. Move it back to generic CP0 helpers.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Message-Id: <20201012095804.3335117-6-f4bug@amsat.org>
target/mips/cp0_helper.c
target/mips/cp0_timer.c
target/mips/internal.h