From 07efd83d7f940a60b4719abbf655eec283fae49c Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 28 Nov 1995 15:09:20 +0000 Subject: [PATCH] Ajout du code pour initialiser les flottants IEEE. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@487 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- testasmcomp/mainarith.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/testasmcomp/mainarith.c b/testasmcomp/mainarith.c index 987ee0603..ad22d2b34 100644 --- a/testasmcomp/mainarith.c +++ b/testasmcomp/mainarith.c @@ -166,7 +166,26 @@ void do_test() INTTEST(r[96], (f >= g)); } +#ifdef __i386__ +#ifdef __linux__ +#include +#endif +#ifdef __FreeBSD__ +#include +#endif +#endif +void init_ieee_floats() +{ +#ifdef __i386__ +#ifdef __linux__ + __setfpucw(_FPU_IEEE); +#endif +#ifdef __FreeBSD__ + fpsetmask(0); +#endif +#endif +} int main(argc, argv) int argc; @@ -174,6 +193,8 @@ int main(argc, argv) { double weird[4]; + init_ieee_floats(); + if (argc >= 5) { x = atoi(argv[1]); y = atoi(argv[2]);