delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/10/11/08:21:43

Date: Mon, 11 Oct 1999 13:28:15 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
Subject: Masking FP exceptions under emulator
Message-ID: <Pine.SUN.3.91.991011132443.28578I-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

It turns out that the startup code only masks all numeric exceptions when 
an FPU is detected.  If we use emulation, the emulator is left with 
whatever default it was built (which, not surprisingly, leaves the 
Invalid Operation unmasked).

Is there any reason not to mask all the exceptions, like we do with a 
real FPU?  If nobody can think of a reason, I will check in the following 
change:

*** src/libc/emu387/npxsetup.c~1	Fri Oct  1 15:12:52 1999
--- src/libc/emu387/npxsetup.c	Fri Oct  8 13:28:52 1999
*************** void _npxsetup(char *argv0)
*** 127,132 ****
--- 127,134 ----
  	}
  #endif
        signal(SIGNOFP, nofpsig);
+       /* mask all exceptions for the emulation case, too */
+       _control87(0x033f, 0xffff);
      }
    }
  }

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019