Xref: utzoo comp.sys.att:4576 unix-pc.general:1557 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!rutgers!cbmvax!ditto From: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Newsgroups: comp.sys.att,unix-pc.general Subject: Re: FPU on the UNIX pc Summary: 020/881 parts of C compiler missing Keywords: unixpc 68881 FPA Message-ID: <5082@cbmvax.UUCP> Date: 24 Oct 88 15:37:27 GMT References: <368@uncle.UUCP> <3462@rphroy.UUCP> <528@icus.islp.ny.us> Reply-To: ditto@kenobi.cbm.commodore.com (Mike "Ford" Ditto) Organization: Commodore Technology, West Chester, PA Lines: 35 In article <528@icus.islp.ny.us> lenny@icus.islp.ny.us (Lenny Tropiano) writes: > "The C compiler uses one of three code generators for the > > CPU=xxxxx,FPU=yyyyy > > where CPU indicates the central processor to generate for and > FPU indicates the style of floating-point math to use. Since the 881 version of the code generator is a separate executable (/lib/ccom20.81 used in place of /lib/ccom) and it is not provided with the Unix PC, it is not possible to generate 68881 code with the standard compiler. The stock assembler WILL assemble 68020 and 68881 code, and adb disassembles it fine as well. I have a version of GCC modified to use the CENVIRON variable in this way, and it generates normal Unix PC code or 68020/68881 code (or 68010/68881, which is what would be needed here). There is already some kind of support for the "fpa board" in the math library; various math routines call "FPA_check" or something like that to see if it's there. I've never bothered to see what they do differently when it's there, though. In particular, I don't know whether 68881 opcodes are used to cuase an illegal instruction trap in the kernel to access the '881 or if it is accessed directly (via I/O). Actually, I don't think the compiler was meant to use 68881 instructions without a 68020. Running "CENVIRON=CPU=68010,FPU=68881 cc t.c" results in: "cc: incompatiable combination of fpu/cpu in CENVIRON". -- -=] Ford [=- "The number of Unix installations (In Real Life: Mike Ditto) has grown to 10, with more expected." ford@kenobi.cts.com - The Unix Programmer's Manual, ...!sdcsvax!crash!elgar!ford 2nd Edition, June, 1972. ditto@cbmvax.commodore.com