]> Git Repo - qemu.git/commitdiff
s390x/tcg: always enable AFP for linux-user
authorDavid Hildenbrand <[email protected]>
Mon, 8 Oct 2018 15:32:04 +0000 (17:32 +0200)
committerPeter Maydell <[email protected]>
Tue, 9 Oct 2018 09:34:01 +0000 (10:34 +0100)
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 <[email protected]>
Cc: Alex Bennée <[email protected]>
Fixes: db0504154e ("s390x/tcg: check for AFP-register, BFP and DFP data exceptions")
Reported-by: Alex Bennée <[email protected]>
Signed-off-by: David Hildenbrand <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Tested-by: Alex Bennée <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Tested-by: Cornelia Huck <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
target/s390x/cpu.c

index 8ed4823d6e54312366a2b6954ad80b88e731b40d..18ba7f85a5f1810b703ef4abc2a96004e581edd5 100644 (file)
@@ -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;
 
This page took 0.028255 seconds and 4 git commands to generate.