summaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2011-04-12 13:56:41 +0100
committerAurelien Jarno <aurelien@aurel32.net>2011-04-12 23:33:33 +0200
commitc07c86af571005a1baf33f51a7337522575feae4 (patch)
tree5f582832df57df7e5ee5fe973fabcdc083d3d2fa /target-arm
parentce4fe9bba4bd471ee1ef5d403551fc01b3bdad51 (diff)
downloadqemu-c07c86af571005a1baf33f51a7337522575feae4.tar.gz
qemu-c07c86af571005a1baf33f51a7337522575feae4.tar.bz2
qemu-c07c86af571005a1baf33f51a7337522575feae4.zip
target-arm: Detect tininess before rounding for FP operations
The ARM architecture mandates that we detect tininess before rounding, so set the softfloat fp_status up appropriately. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/helper.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index ce9a9d8fd2..9172fc7279 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -269,6 +269,10 @@ void cpu_reset(CPUARMState *env)
set_flush_to_zero(1, &env->vfp.standard_fp_status);
set_flush_inputs_to_zero(1, &env->vfp.standard_fp_status);
set_default_nan_mode(1, &env->vfp.standard_fp_status);
+ set_float_detect_tininess(float_tininess_before_rounding,
+ &env->vfp.fp_status);
+ set_float_detect_tininess(float_tininess_before_rounding,
+ &env->vfp.standard_fp_status);
tlb_flush(env, 1);
}