]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport of 2.18:
authorGuido van Rossum <guido@python.org>
Thu, 26 Sep 2002 16:53:31 +0000 (16:53 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 26 Sep 2002 16:53:31 +0000 (16:53 +0000)
Patch for the DEC Alpha under Linux, by Lee Busby.

Modules/fpectlmodule.c

index 843bc165fa782e9dd9ae480d77749a07a34410eb..b6643d0d337d292f59591ec260c99fab1ac33f1b 100644 (file)
@@ -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 */