From: Aurelien Jarno Date: Sun, 24 May 2015 23:47:26 +0000 (+0200) Subject: target-s390x: detect tininess before rounding for FP operations X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=4a33565f9f46145d8cc701ab623b18bf423c469e;p=qmiga%2Fqemu.git target-s390x: detect tininess before rounding for FP operations The s390x floating point unit detects tininess before rounding, so set the softfloat fp_status up appropriately. Signed-off-by: Aurelien Jarno Signed-off-by: Alexander Graf --- diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index d2f9836e86..7f17823e40 100644 --- a/target-s390x/cpu.c +++ b/target-s390x/cpu.c @@ -118,6 +118,10 @@ static void s390_cpu_initial_reset(CPUState *s) env->pfault_token = -1UL; + /* tininess for underflow is detected before rounding */ + set_float_detect_tininess(float_tininess_before_rounding, + &env->fpu_status); + /* Reset state inside the kernel that we cannot access yet from QEMU. */ if (kvm_enabled()) { kvm_s390_reset_vcpu(cpu); @@ -143,6 +147,10 @@ static void s390_cpu_full_reset(CPUState *s) env->pfault_token = -1UL; + /* tininess for underflow is detected before rounding */ + set_float_detect_tininess(float_tininess_before_rounding, + &env->fpu_status); + /* Reset state inside the kernel that we cannot access yet from QEMU. */ if (kvm_enabled()) { kvm_s390_reset_vcpu(cpu);