提交 53a19a9a 编写于 作者: D David Hildenbrand 提交者: Peter Maydell

s390x/tcg: always enable AFP for linux-user

linux-user should always enable AFP, otherwise our emulated binary
might crash once it tries to make use of additional floating-point
registers or instructions.

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Alex Bennée <alex.bennee@linaro.org>
Fixes: db050415 ("s390x/tcg: check for AFP-register, BFP and DFP data exceptions")
Reported-by: NAlex Bennée <alex.bennee@linaro.org>
Signed-off-by: NDavid Hildenbrand <david@redhat.com>
Reviewed-by: NThomas Huth <thuth@redhat.com>
Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
Tested-by: NAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: NCornelia Huck <cohuck@redhat.com>
Tested-by: NCornelia Huck <cohuck@redhat.com>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 7c69b7c8
......@@ -145,6 +145,11 @@ static void s390_cpu_full_reset(CPUState *s)
env->cregs[0] = CR0_RESET;
env->cregs[14] = CR14_RESET;
#if defined(CONFIG_USER_ONLY)
/* user mode should always be allowed to use the full FPU */
env->cregs[0] |= CR0_AFP;
#endif
/* architectured initial value for Breaking-Event-Address register */
env->gbea = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册