From 36802b6b1ed7887aeae5d027f86a969400f8824a Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 19 May 2011 14:46:18 +0100 Subject: target-arm: Signal Underflow when denormal flushed to zero on output On ARM the architecture mandates that when an output denormal is flushed to zero we must set the FPSCR UFC (underflow) bit, so map softfloat's float_flag_output_denormal accordingly. Signed-off-by: Peter Maydell Signed-off-by: Aurelien Jarno --- target-arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'target-arm/helper.c') diff --git a/target-arm/helper.c b/target-arm/helper.c index f07252768a..05b3ccca2d 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2355,7 +2355,7 @@ static inline int vfp_exceptbits_from_host(int host_bits) target_bits |= 2; if (host_bits & float_flag_overflow) target_bits |= 4; - if (host_bits & float_flag_underflow) + if (host_bits & (float_flag_underflow | float_flag_output_denormal)) target_bits |= 8; if (host_bits & float_flag_inexact) target_bits |= 0x10; -- cgit v1.2.1