www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/07/08:46:17

Xref: news2.mv.net comp.os.msdos.djgpp:6715
From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: NextGen 586, Floating point woes
Date: Fri, 02 Aug 1996 11:11:57 +0100
Organization: Lehrstuhl fuer Stroemungsmechanik
Lines: 59
Message-ID: <3201D46D.52BF@LSTM.Ruhr-UNI-Bochum.De>
References: <4trf3n$ouo AT aphex DOT direct DOT ca>
NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
CC: sandmann AT clio DOT rice DOT edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Geoffrey Higginson wrote:
> 
> My DJGPP programs require floating point calculations.  Though they
> work on other machines (via either co-processor or emulator support)
> they fail (read:  crash with a floating point exception) on the
> NextGen 586 processor.  Why?
> 
> Since numerous other programs fail to recognize the chip correctly
> (Windows 95, for example, considers it to be a 386) I assume that
> the cause of the exception is DJGPP's floating point support
> bailing out.
> 
> Out of curiosity, I attempted to use the emulator (a strange thing to
> do on a 586 I admit).  No debugger was availiable, but my simple
> test program never ceased execution.
> 
> So, how does one do floating point on the NextGen?  (Short of
> replacing the d*mned CPU please).
> 
> -----
> Geoffrey Higginson <ghiggins AT direct DOT ca>
It is in the file djgpp/src/libc/emu387/fpu.s

[...]
        .global __detect_80387          /* direct from the Intel manual */
__detect_80387:                         /* returns 1 if 387 (or more), else 0 */
        pushl   %esi
        pushl   %eax                    /* Dummy work area on stack */
        movl    %esp,%esi
        fninit
        movw    $0x5a5a,(%esi)
        fnstsw  (%esi)
        cmpb    $0,(%esi)
        jne     Lno_387
[...]        
That is how it does it, but that probably does not help you any further.

The function is called by npxsetup.c, same directory. It checks
the environment variable 387 to see if you set it to "N", but
unfortunately not, if you set it to "Y". Charles, is that not something
to change?


-- 
Ciao
Tom



*************************************************************
* Thomas Demmer                                             *
* Lehrstuhl fuer Stroemungsmechanik                         *
* Ruhr-Uni-Bochum                                           *
* Universitaetsstr. 150                                     *
* D-44780  Bochum                                           *
* Tel: +49 234 700 6434                                     *
* Fax: +49 234 709 4162                                     *
* http://www.lstm.ruhr-uni-bochum.de/~demmer                *
*************************************************************

- Raw text -


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