[fpc-pascal] using float emulation

Daniël Mantione daniel.mantione at freepascal.org
Fri Jun 1 21:26:35 CEST 2007



Op Fri, 1 Jun 2007, schreef Marc Santhoff:

> Am Freitag, den 01.06.2007, 20:58 +0200 schrieb Daniël Mantione:
> > 
> > Op Fri, 1 Jun 2007, schreef Marc Santhoff:
> > 
> > > Hi,
> > > 
> > > I'm trying to force fpc to use emulation code for floating poing
> > > calculations on i386 hardware.
> > > 
> > > $ fpc -al -st -Op1 -CfSOFT floattest.pp
> > > 
> > > Viewn from the assembler source the file is identical to one compiled
> > > without target options and the link script does not show the inclusion
> > > of something special.
> > > 
> > > This should work (me thinks;), but the info screen specifies -Op1 for
> > > 386/486. A i486 *does* have a coprocessor.
> > > 
> > > How can aks fpc to write code for an i386sx without FPU?
> > 
> > Use fpu emulation.
> > 
> > Please see http://www.freepascal.org/faq.var#fp386
> 
> Hmm, talking about DOS there.

Yes, few people run anything else on a 386 :)

> > I doubt softwarefloat is in working condition on i386, probably several of 
> > the assembler routines use the fpu. However, the compiler should be able 
> > to generate softfpu calls if -Cfsoft is used on x86.
> 
> So on Unix'ish FreeBSD I'm pretty lost, I assume ...

If it has no fpu emulator...

Well, if you have some simple programmers skills, you might be able to 
make it work. Recompile the rtl with softfloat, and fix some assembler 
here and there.

Daniël


More information about the fpc-pascal mailing list