From: gsw AT aloft DOT att DOT com Date: Fri, 16 Jul 93 14:18:09 EDT Original-From: aloft!gsw (gerald.s.williams) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: How do I use emu387 only when necessary? Jeremy Mathers writes: > I remember asking this question a long time ago - in the context of > "What will happen if I run a DJGPP compiled program that does floating > point on a 486 DX, but happen to have the emu field set in the GO32 var?" > > At that time, I was told (by who I cannot remember) that it would use > the chip (i.e., would "do the right thing"). Was I misled? I don't know what GO32 v1.10 does, but v1.09 definitely uses the EMU387 emulator code in that case. In fact, we are using this as a work-around for the case where our GCC cross-compiler does constant folding causing unhandled floating point exceptions, which causes our cross-compiler to go belly-up (we are currently using DJGPP to compile the compiler). Actually, this is an indication of a problem with GO32. Code running under the emulator does not work exactly the same way as code using floating point hardware, since unhandled coprocessor exceptions (we've seen it with divide by zero) cause GO32 to fail. In our case, it is unacceptible for our cross-compiler to abort in response to any input file, so this is a critical problem. I would expect that divide by zero exceptions should cause an infinity to be generated, since I've seen that method used, at least when IEEE floating point arithmetic is being used. ,-----------------. |Gerald S Williams| |gsw AT aloft DOT att DOT com| | (215)439-7237 | `-----------------' _ | ____/ _ | / / / / / / / / / ____ | ____/ _ _/ __ | __ | / ____/ / / / / / / / / / / ____ ______/ ______/ __/ ___/ _____/ _____/ ___/ ______/