[fpc-pascal] using float emulation

Marc Santhoff M.Santhoff at t-online.de
Fri Jun 1 22:36:28 CEST 2007


Am Freitag, den 01.06.2007, 21:26 +0200 schrieb Daniël Mantione:
> 
> 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.

Ah, now I understand: the system emulates the fpu if not present and the
rtl has to compiled accordingly ... interesting.

Sadly the emulator code in freebsd is not that promising. All this would
be much work for doing some test for comparison. Maybe if the weather is
getting bad over the weekend I'll try. ;)

Thank you, at least I've learned a lot,
Marc





More information about the fpc-pascal mailing list