diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1995-09-25 14:41:28 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1995-09-25 14:41:28 +0000 |
commit | c4e7e377ffd6c00a4ca69c771c86896c46b8d657 (patch) | |
tree | e36d1f1dbd81c05d0ab4a23971c0602fa534bda0 | |
parent | ed5c3bffb8bf4ddaf38095e89847e7c187a05e95 (diff) |
Ajout du code pour passer le 387 en mode IEEE sous Linux.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@287 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | asmrun/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/asmrun/main.c b/asmrun/main.c index 3e6dcceca..2e7d45f96 100644 --- a/asmrun/main.c +++ b/asmrun/main.c @@ -15,6 +15,9 @@ #include <stdio.h> #include <stdlib.h> +#ifdef __linux__ +#include <i386/fpu_control.h> +#endif #include "gc.h" #include "gc_ctrl.h" #include "misc.h" @@ -40,6 +43,12 @@ int main(argc, argv) char * opt; value retcode; + /* Machine-dependent initialization of the floating-point hardware + so that it behaves as much as possible as specified in IEEE */ +#ifdef __linux__ + __setfpucw(_FPU_IEEE); +#endif + #ifdef DEBUG verbose_init = 1; #endif |