bug in System V c compiler for 3b2

Robert Viduya robert at gitpyr.UUCP
Sun May 25 04:24:02 AEST 1986


>ddj at mtx5a.UUCP (Dennis D. Jurgensen) (ddj at mtx5a.UUCP, <1327 at mtx5a.UUCP>):
> 
> I compiled a 68000 cross-compiler on a 3b2 successfully I thought.
> However when I tried to use it to compile some floating point
> libraries the compiler core-dumped due to an illegal instruction.
> 

My guess as to what the problem is is that a 3B2/300 (don't know about 3B2/310s
or 3B2/400s) doesn't support hardware floating point instructions, but the
C compiler will generate them.  In order to compile programs that use floats
or doubles, the C compiler has to be called with the '-f' option (this is, of
course, undocumented, at least in all the 3B2 manuals I have).  Note
that the compiler will still generate floating point instructions; the -f
option merely loads up a different runtime object file (/lib/fcrt0.o instead
of /lib/crt0.o).  I don't know for sure, but I think fcrt0.o enables an
illegal instruction trap to catch all illegal instructions and simulate the
floating point ones in software.  Slow, but effective.

				robert
-- 
Robert Viduya							01111000
Office of Computing Services
Georgia Institute of Technology

UUCP:	..gatech!gitpyr!robert
BITNET:	CC100RV @ GITVM1



More information about the Comp.unix.wizards mailing list