summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asmrun/main.c9
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