Math Co-procs

Dan Lau dlau at mipos2.intel.com
Thu Dec 20 06:38:37 AEST 1990


In article <276f6aae-1decomp.unix.sysv386 at tronsbox.xei.com> tron1 at tronsbox.xei.com (HIM) writes:
>
>Now, the question.... many of the replies I got told me that the SysV math
>code for using the math co-proc is really for the 80287 for compatibility
>reasons. So this means that these are my questions...

The SysV math library code actually checks at run-time whether a 287 or
387 is available, and it will use the 387 instructions only if a 387 is
installed (or the 387 emulator is being used).  That was the way the code
looked when Intel gave it back to AT&T, I don't know if the current
versions are still the same.  The standard pcc in SysV does not generate
in-line math operations, so there is no question of compatibility there.
Almost all third party 386 compilers will generate the 387 instructions
directly for some of the math functions (like sin/cos, sqrt, etc.).  The
compilers are supposed to "assume" only a 287, unless there is a command
line switch given (typically -f387).

Speaking of the emulator, I know AT&T used to (still do?) ship two versions
of the 387 emulator with SysV3.2+, do other vendors do it too?  Are they
both there on SVR4.0?  Any comments on these two emulators, good or bad?
	Dan Lau
	Intel Corp.



More information about the Comp.unix.sysv386 mailing list