[comp.os.minix] floating point in Minix C

kjh@pollux.usc.edu (Kenneth J. Hendrickson) (07/30/90)

Is there any simple flag to use for cc so that the libfp.a library will
be used before libc.a?  Is the only way to compile with -S, and then
explicitly execute asld?

Or maybe I have it all wrong?  Maybe I need to put the routines from the
libfp.a that I have into libc.a (replacing those routines that don't
support floating point like printf(), and adding missing routines)?

Where is the source code for these routines (in libfp.a)?

Why do I get the "Warning: dummy floating point constant(s)" message
from the C compiler every time I compile any program with any float
variables?

Please help.  I want to get floating point working.  (My next step will
be to introduce code to support the 80x87 math co-processor chips in the
kernel, and to get math co-processor code into the libraries also.)
Who knows?  Maybe we can turn Minix into a real tool.

Not having floating point is a worse limitation than 64k I+D.

Ken Hendrickson N8DGN/6      kjh@usc.edu      ...!uunet!usc!pollux!kjh

cechew@bruce.cs.monash.OZ.AU (Earl Chew) (07/31/90)

In <26232@usc.edu> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:

>Is there any simple flag to use for cc so that the libfp.a library will

Hmm... where did you get the libfp.a library from? I presume this is from Peter
Housel's fp package. If this is the case, it should have come with patches for
cc.c which will cause asld to scan libfp.a first.

>Or maybe I have it all wrong?  Maybe I need to put the routines from the
>libfp.a that I have into libc.a (replacing those routines that don't
>support floating point like printf(), and adding missing routines)?

No, have a separate libfp.a. See Peter's patches to cc.c.

>Where is the source code for these routines (in libfp.a)?

Which routines? libfp.a? They come from Peter's patches. printf()? A version
was also posted with Peter's patches. Alternatively you can replace the whole
lot with estdio.

>Why do I get the "Warning: dummy floating point constant(s)" message

You will need to use cc -f prog.c.

>Not having floating point is a worse limitation than 64k I+D.

No, it's not :-)

Earl
-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
ARPA: cechew%bruce.cs.monash.oz.au@uunet.uu.net  ACS : cechew@bruce.oz
----------------------------------------------------------------------

hall@cod.NOSC.MIL (Robert R. Hall) (07/31/90)

In article <2781@bruce.cs.monash.OZ.AU>, cechew@bruce.cs.monash.OZ.AU (Earl Chew) writes:
> No, have a separate libfp.a. See Peter's patches to cc.c.
> 
Peter's patches were on version 1.3.  Can they be applied to version
1.5.10 or should there be an update?

HBO043%DJUKFA11.BITNET@cunyvm.cuny.edu (Christoph van Wuellen) (07/31/90)

the dummy float const warning comes from the code generator (not the compiler
itself) which is not able to generate floats.
Insert a filter which converts the floats to 64-bit integers first.

about libfp.a: does cc -o .... .... -lfp not work on PC?

C.v.W.

cechew@bruce.cs.monash.OZ.AU (Earl Chew) (08/01/90)

In <2024@cod.NOSC.MIL> hall@cod.NOSC.MIL (Robert R. Hall) writes:

>Peter's patches were on version 1.3.  Can they be applied to version
>1.5.10 or should there be an update?

This is true. The patches were quite trivial and I managed to insert them into
1.5.10 with little effort.

Earl
-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
ARPA: cechew%bruce.cs.monash.oz.au@uunet.uu.net  ACS : cechew@bruce.oz
----------------------------------------------------------------------

kjh@pollux.usc.edu (Kenneth J. Hendrickson) (08/01/90)

In article <2782@bruce.cs.monash.OZ.AU> cechew@bruce.cs.monash.OZ.AU (Earl Chew) writes:
>>Peter's patches [for floating point C in Minix] ...

Where are these patches available?  I was searching all over the place
with ftp, and I came up empty-handed.  Can somebody please point me to
these floating point additions to Minix?  Thanks.

-- 
Ken Hendrickson N8DGN/6       kjh@usc.edu      ...!uunet!usc!pollux!kjh

cechew@bruce.cs.monash.OZ.AU (Earl Chew) (08/02/90)

In <26345@usc.edu> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:

>In article <2782@bruce.cs.monash.OZ.AU> cechew@bruce.cs.monash.OZ.AU (Earl Chew) writes:
>Where are these patches available?  I was searching all over the place

I've just sent them to Adelaide. Hopefully they should be available there soon.
These are Peter's original postings (unshar'ed). Perhaps Noid can make an
announcement when he has them in place.

Earl
-- 
Earl Chew, Dept of Computer Science, Monash University, Australia 3168
ARPA: cechew%bruce.cs.monash.oz.au@uunet.uu.net  ACS : cechew@bruce.oz
----------------------------------------------------------------------