summaryrefslogtreecommitdiff
path: root/Modules/fpectlmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-09-26 16:52:02 +0000
committerGuido van Rossum <guido@python.org>2002-09-26 16:52:02 +0000
commit9b1a80baf407e5a0bee40e28357d35e64263233e (patch)
tree781d97a131493daffedf1b9728a6cb6ddb7dbe07 /Modules/fpectlmodule.c
parent67c4cb1f13e0a8dbbe8d2447165f27b2ef8e48fd (diff)
downloadcpython-git-9b1a80baf407e5a0bee40e28357d35e64263233e.tar.gz
Patch for the DEC Alpha under Linux, by Lee Busby.
Diffstat (limited to 'Modules/fpectlmodule.c')
-rw-r--r--Modules/fpectlmodule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/fpectlmodule.c b/Modules/fpectlmodule.c
index c29bcef655..099cda02ca 100644
--- a/Modules/fpectlmodule.c
+++ b/Modules/fpectlmodule.c
@@ -180,6 +180,14 @@ static void fpe_reset(Sigfunc *handler)
ieee_set_fp_control(fp_control);
PyOS_setsig(SIGFPE, handler);
+/*-- DEC ALPHA LINUX ------------------------------------------------------*/
+#elif defined(__alpha) && defined(linux)
+#include <asm/fpu.h>
+ unsigned long fp_control =
+ IEEE_TRAP_ENABLE_INV | IEEE_TRAP_ENABLE_DZE | IEEE_TRAP_ENABLE_OVF;
+ ieee_set_fp_control(fp_control);
+ PyOS_setsig(SIGFPE, handler);
+
/*-- Cray Unicos ----------------------------------------------------------*/
#elif defined(cray)
/* UNICOS delivers SIGFPE by default, but no matherr */