]> granicus.if.org Git - python/commitdiff
Patch for the DEC Alpha under Linux, by Lee Busby.
authorGuido van Rossum <guido@python.org>
Thu, 26 Sep 2002 16:52:02 +0000 (16:52 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 26 Sep 2002 16:52:02 +0000 (16:52 +0000)
Modules/fpectlmodule.c

index c29bcef6555beb9d75e0be7f6f63cf675611dd72..099cda02caae252bf06273efa16d278e4f3932a1 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 */