Soft Float for PC386

Angelo Fraietta angelo at hunterlink.net.au
Fri Feb 23 01:05:43 UTC 2001


If I build the pc386 with both the -mno-fp-ret-in-387 and the -msoft-float flags
the machine re-boots if you try to create a task. Eg, if you try to run the
ticker sample, the machine re-boots.  If you only use the -msoft-float and not
the -mno-fp-ret-in-387 flag, the tasks run OK.
I am mentioning this because the ts_386ex build uses both flags, and so if
someone tests these on a ts_386ex, they may want to try running ticker on it to
see if it crashes.

The exception is still thrown if I try to use a floating point routine.


Joel Sherrill wrote:

> angelo wrote:
> >
> > I have successfully run  RTEMS apps on a Pentium using the pc386 build,
> > however, when I attempt to run the apps (including the hello world ) on a
> > 386 with no co-processor, The console just display an infinite Exception
> > which I cannot read.
>
> Hmmm.. I would be surprised if the lack of an FPU is causing this.  But
> stranger things have happened over the years.  What RTEMS version are
> you trying?  It might also be worth it to put a "while 1" loop in the
> exception handler temporarily so the message won't disappear.
>
> > I suspect that it may be that soft float is required,
> > but I am not sure.  Is there a way of ensuring that I am not trying to use
> > the co-processor and am in fact using the soft floating point libraries.
>
> The answer is simple and not so simple at the same time.  The standard
> gcc sources do not have soft-float support turned on for the i386 targets.
> The RTEMS gcc patches and RPMs post 4.5.0 do include support for this.
>
> If you look at the ts_386ex target in recent snapshots, its CPU_CFLAGS
> should be the basis for adding a new pc386 variant (like pc[56]86 and
> pck6).  Right now all pc386 variants assume an FPU.
>
> > --
> > Angelo Fraietta
> >
> > PO Box 859
> > Hamilton NSW 2303
> >
> > Home Page
> >
> > http://users.hunterlink.net.au/~maaaf/
> >
> > There are those who seek knowledge for the sake of knowledge - that is
> > CURIOSITY
> > There are those who seek knowledge to be known by others - that is VANITY
> > There are those who seek knowledge in order to serve - that is LOVE
> >     Bernard of Clairvaux (1090 - 1153)
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel at OARcorp.com                 On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985

--
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page

http://users.hunterlink.net.au/~maaaf/

There are those who seek knowledge for the sake of knowledge - that is CURIOSITY

There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)





More information about the users mailing list