target/openrisc: Allow fpcsr access in user mode
authorStafford Horne <shorne@gmail.com>
Sun, 12 Feb 2023 09:08:13 +0000 (18:08 +0900)
committerStafford Horne <shorne@gmail.com>
Thu, 11 May 2023 14:40:03 +0000 (15:40 +0100)
commit08f021de3af599b8ca4c745f324a3559dc2990d3
tree3c1f6ddc6ff00d55512747a2ccd0313010bbbca9
parentc1eb2ddf0f8075faddc5f7c3d39feae3e8e9d6b4
target/openrisc: Allow fpcsr access in user mode

As per OpenRISC spec 1.4 FPCSR can be read and written in user mode.

Update mtspr and mfspr helpers to support this by moving the is_user
check into the helper.

Link: https://raw.githubusercontent.com/openrisc/doc/master/openrisc-arch-1.4-rev0.pdf
Signed-off-by: Stafford Horne <shorne@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
target/openrisc/sys_helper.c
target/openrisc/translate.c