about summary refs log tree commit diff
path: root/soft-fp
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-10-10 11:38:56 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-10-10 11:38:56 +0000
commit2ae21ed2d2e2e0e38b84bd046bcf5f009ab417f3 (patch)
tree6601496a93918a878fa9f609341f2d08c88756f0 /soft-fp
parentcb8f9562a53b54ffbcc0b4ba4a6ac5e56b05beb2 (diff)
downloadglibc-2ae21ed2d2e2e0e38b84bd046bcf5f009ab417f3.tar.gz
glibc-2ae21ed2d2e2e0e38b84bd046bcf5f009ab417f3.tar.xz
glibc-2ae21ed2d2e2e0e38b84bd046bcf5f009ab417f3.zip
soft-fp: fix negation NaN handling (bug 16034).
Diffstat (limited to 'soft-fp')
-rw-r--r--soft-fp/negdf2.c7
-rw-r--r--soft-fp/negsf2.c7
-rw-r--r--soft-fp/negtf2.c7
-rw-r--r--soft-fp/op-common.h4
4 files changed, 7 insertions, 18 deletions
diff --git a/soft-fp/negdf2.c b/soft-fp/negdf2.c
index 3cc6f5f400..1dedc715dd 100644
--- a/soft-fp/negdf2.c
+++ b/soft-fp/negdf2.c
@@ -33,15 +33,12 @@
 
 DFtype __negdf2(DFtype a)
 {
-  FP_DECL_EX;
   FP_DECL_D(A); FP_DECL_D(R);
   DFtype r;
 
-  FP_UNPACK_D(A, a);
+  FP_UNPACK_RAW_D(A, a);
   FP_NEG_D(R, A);
-  FP_PACK_D(r, R);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
+  FP_PACK_RAW_D(r, R);
 
   return r;
 }
diff --git a/soft-fp/negsf2.c b/soft-fp/negsf2.c
index d8d5910603..35ece56fc4 100644
--- a/soft-fp/negsf2.c
+++ b/soft-fp/negsf2.c
@@ -33,15 +33,12 @@
 
 SFtype __negsf2(SFtype a)
 {
-  FP_DECL_EX;
   FP_DECL_S(A); FP_DECL_S(R);
   SFtype r;
 
-  FP_UNPACK_S(A, a);
+  FP_UNPACK_RAW_S(A, a);
   FP_NEG_S(R, A);
-  FP_PACK_S(r, R);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
+  FP_PACK_RAW_S(r, R);
 
   return r;
 }
diff --git a/soft-fp/negtf2.c b/soft-fp/negtf2.c
index 1c08441487..f51a621611 100644
--- a/soft-fp/negtf2.c
+++ b/soft-fp/negtf2.c
@@ -33,15 +33,12 @@
 
 TFtype __negtf2(TFtype a)
 {
-  FP_DECL_EX;
   FP_DECL_Q(A); FP_DECL_Q(R);
   TFtype r;
 
-  FP_UNPACK_Q(A, a);
+  FP_UNPACK_RAW_Q(A, a);
   FP_NEG_Q(R, A);
-  FP_PACK_Q(r, R);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
+  FP_PACK_RAW_Q(r, R);
 
   return r;
 }
diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h
index 75ea352bc7..5dfb73c185 100644
--- a/soft-fp/op-common.h
+++ b/soft-fp/op-common.h
@@ -771,14 +771,12 @@ do {									 \
 
 
 /*
- * Main negation routine.  FIXME -- when we care about setting exception
- * bits reliably, this will not do.  We should examine all of the fp classes.
+ * Main negation routine.  The input value is raw.
  */
 
 #define _FP_NEG(fs, wc, R, X)		\
   do {					\
     _FP_FRAC_COPY_##wc(R, X);		\
-    R##_c = X##_c;			\
     R##_e = X##_e;			\
     R##_s = 1 ^ X##_s;			\
   } while (0)