Patchwork [1/5] softfloat: Reinstate accidentally disabled target-specific NaN handling

login
register
mail settings
Submitter Peter Maydell
Date Sept. 28, 2011, 5:27 p.m.
Message ID <1317230853-24970-2-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/116844/
State New
Headers show

Comments

Peter Maydell - Sept. 28, 2011, 5:27 p.m.
Include config.h in softfloat.c, so that the target specific ifdefs in
softfloat-specialize.h are evaluated correctly. This was accidentally
broken in commit 789ec7ce2 when config-target.h was removed from
softfloat.h, and means that most targets will have been returning the
wrong results for calculations involving NaNs.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 fpu/softfloat.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Richard Henderson - Sept. 30, 2011, 3:03 p.m.
On 09/28/2011 10:27 AM, Peter Maydell wrote:
> Include config.h in softfloat.c, so that the target specific ifdefs in
> softfloat-specialize.h are evaluated correctly. This was accidentally
> broken in commit 789ec7ce2 when config-target.h was removed from
> softfloat.h, and means that most targets will have been returning the
> wrong results for calculations involving NaNs.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

Patch

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 2b20085..3aafa81 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -35,6 +35,11 @@  these four paragraphs for those parts of this code that are retained.
 
 =============================================================================*/
 
+/* softfloat (and in particular the code in softfloat-specialize.h) is
+ * target-dependent and needs the TARGET_* macros.
+ */
+#include "config.h"
+
 #include "softfloat.h"
 
 /*----------------------------------------------------------------------------