summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-21 20:35:57 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-21 20:35:57 +0000
commit7ef78c0ee945d35db006506d14dc3107b8682da7 (patch)
tree4948a3e9be46d72766ccdee0bb2914089d321323
parente02b70bd6beff3cb99cb710b23aceb45185c83d4 (diff)
downloadgcc-7ef78c0ee945d35db006506d14dc3107b8682da7.tar.gz
decnumber/
* decLibrary.c (__dec_type_swap): Add prototype. (__dfp_enable_traps, dfp_raise): Delete. gcc/ * config/dfp-bit.h (CONTEXT_TRAPS, CONTEXT_ERRORS, DFP_RAISE): Delete. * config/dfp-bit.c (dfp_unary_op, dfp_binary_op, dfp_compare_op, DFP_TO_DFP, INT_TO_DFP, BFP_TO_DFP): Remove calls to DFP_RAISE. testsuite/ * gcc.dg/dfp/snan.c: Delete. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119068 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/dfp-bit.c15
-rw-r--r--gcc/config/dfp-bit.h6
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/dfp/snan.c28
-rw-r--r--libdecnumber/ChangeLog3
-rw-r--r--libdecnumber/decLibrary.c17
7 files changed, 13 insertions, 66 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e55777a6af0..74c98548750 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2006-11-21 Janis Johnson <janis187@us.ibm.com>
+ * config/dfp-bit.h (CONTEXT_TRAPS, CONTEXT_ERRORS, DFP_RAISE): Delete.
+ * config/dfp-bit.c (dfp_unary_op, dfp_binary_op, dfp_compare_op,
+ DFP_TO_DFP, INT_TO_DFP, BFP_TO_DFP): Remove calls to DFP_RAISE.
+
* config/dfp-bit.c (dfp_binary_func): Fix typedef.
2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
diff --git a/gcc/config/dfp-bit.c b/gcc/config/dfp-bit.c
index 9cdf64596fa..fafe7dc1a2d 100644
--- a/gcc/config/dfp-bit.c
+++ b/gcc/config/dfp-bit.c
@@ -88,9 +88,6 @@ dfp_unary_op (dfp_unary_func op, DFP_C_TYPE arg)
/* Perform the operation. */
op (&res, &arg1, &context);
- if (CONTEXT_TRAPS && CONTEXT_ERRORS (context))
- DFP_RAISE (0);
-
TO_ENCODED (&encoded_result, &res, &context);
IEEE_TO_HOST (encoded_result, &result);
return result;
@@ -118,9 +115,6 @@ dfp_binary_op (dfp_binary_func op, DFP_C_TYPE arg_a, DFP_C_TYPE arg_b)
/* Perform the operation. */
op (&res, &arg1, &arg2, &context);
- if (CONTEXT_TRAPS && CONTEXT_ERRORS (context))
- DFP_RAISE (0);
-
TO_ENCODED (&encoded_result, &res, &context);
IEEE_TO_HOST (encoded_result, &result);
return result;
@@ -148,9 +142,6 @@ dfp_compare_op (dfp_binary_func op, DFP_C_TYPE arg_a, DFP_C_TYPE arg_b)
/* Perform the comparison. */
op (&res, &arg1, &arg2, &context);
- if (CONTEXT_TRAPS && CONTEXT_ERRORS (context))
- DFP_RAISE (0);
-
if (decNumberIsNegative (&res))
result = -1;
else if (decNumberIsZero (&res))
@@ -379,8 +370,6 @@ DFP_TO_DFP (DFP_C_TYPE f_from)
HOST_TO_IEEE (f_from, &s_from);
TO_INTERNAL (&s_from, &d);
TO_ENCODED_TO (&s_to, &d, &context);
- if (CONTEXT_TRAPS && (context.status & DEC_Inexact) != 0)
- DFP_RAISE (DEC_Inexact);
IEEE_TO_HOST_TO (s_to, &f_to);
return f_to;
@@ -469,8 +458,6 @@ INT_TO_DFP (INT_TYPE i)
/* Convert from the floating point string to a decimal* type. */
FROM_STRING (&s, buf, &context);
IEEE_TO_HOST (s, &f);
- if (CONTEXT_TRAPS && (context.status & DEC_Inexact) != 0)
- DFP_RAISE (DEC_Inexact);
return f;
}
#endif
@@ -519,8 +506,6 @@ BFP_TO_DFP (BFP_TYPE x)
/* Convert from the floating point string to a decimal* type. */
FROM_STRING (&s, buf, &context);
IEEE_TO_HOST (s, &f);
- if (CONTEXT_TRAPS && (context.status & DEC_Inexact) != 0)
- DFP_RAISE (DEC_Inexact);
return f;
}
#endif
diff --git a/gcc/config/dfp-bit.h b/gcc/config/dfp-bit.h
index a6c7798982b..dfad7d308b1 100644
--- a/gcc/config/dfp-bit.h
+++ b/gcc/config/dfp-bit.h
@@ -118,12 +118,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
extern enum rounding __decGetRound (void);
#define CONTEXT_ROUND __decGetRound ()
-extern int __dfp_traps;
-#define CONTEXT_TRAPS __dfp_traps
-#define CONTEXT_ERRORS(context) context.status & DEC_Errors
-extern void __dfp_raise (int);
-#define DFP_RAISE(A) __dfp_raise(A)
-
/* Conversions between different decimal float types use WIDTH_TO to
determine additional macros to define. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 592794380a5..fc8a3ed5bf1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,8 @@
-2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
+2006-11-21 Janis Johnson <janis187@us.ibm.com>
+
+ * gcc.dg/dfp/snan.c: Delete.
+
+2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
* g++.dg/cpp0x/static_assert1.C: New.
* g++.dg/cpp0x/static_assert2.C: New.
diff --git a/gcc/testsuite/gcc.dg/dfp/snan.c b/gcc/testsuite/gcc.dg/dfp/snan.c
deleted file mode 100644
index efc6e70ee83..00000000000
--- a/gcc/testsuite/gcc.dg/dfp/snan.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* { dg-options "" } */
-
-/* FIXME: this test needs to be conditional to systems with POSIX signals. */
-
-#include <signal.h>
-
-extern void exit(int status);
-extern void abort(void);
-
-void go_quietly (int arg)
-{
- exit (0);
-}
-
-int main()
-{
- _Decimal32 d = 1.5df;
-
- /* Enable signaling NaNs using a scaffolding libgcc function. */
- __dfp_enable_traps ();
- signal (SIGFPE, go_quietly);
-
- d = d / 0.0df;
-
- /* Never reached. */
- abort ();
- return 0;
-}
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog
index 5810ffff2d2..0068a92bfad 100644
--- a/libdecnumber/ChangeLog
+++ b/libdecnumber/ChangeLog
@@ -1,5 +1,8 @@
2006-11-21 Janis Johnson <janis187@us.ibm.com>
+ * decLibrary.c (__dec_type_swap): Add prototype.
+ (__dfp_enable_traps, dfp_raise): Delete.
+
* Makefile.in: Don't include decRound in library used by compiler.
2006-10-10 Brooks Moses <bmoses@stanford.edu>
diff --git a/libdecnumber/decLibrary.c b/libdecnumber/decLibrary.c
index 19468ac892e..f757ffa67d0 100644
--- a/libdecnumber/decLibrary.c
+++ b/libdecnumber/decLibrary.c
@@ -31,8 +31,7 @@ void __host_to_ieee_128 (_Decimal128, decimal128 *);
extern int isinfd32 (_Decimal32);
extern int isinfd64 (_Decimal64);
extern int isinfd128 (_Decimal128);
-extern void __dfp_enable_traps (void);
-extern void __dfp_raise (int exception __attribute__ ((unused)));
+uint32_t __dec_byte_swap (uint32_t);
int
isinfd32 (_Decimal32 arg)
@@ -67,20 +66,6 @@ isinfd128 (_Decimal128 arg)
return (decNumberIsInfinite (&dn));
}
-int __dfp_traps;
-
-void
-__dfp_enable_traps (void)
-{
- __dfp_traps = 1;
-}
-
-void
-__dfp_raise (int exception __attribute__ ((unused)))
-{
- raise (SIGFPE);
-}
-
uint32_t
__dec_byte_swap (uint32_t in)
{