[fpc-devel] MIPS big-endian program starts but does nothing

Sven Barth pascaldragon at googlemail.com
Tue Sep 9 11:19:12 CEST 2014

Am 09.09.2014 08:53 schrieb "Sergei Gorelkin" <sergei_gorelkin at mail.ru>:
> 09.09.2014 9:53, Sven Barth пишет:
>> On 08.09.2014 22:54, Michael Ring wrote:
>>> This smells like a problem I had on pic32. In my case the pic32 chips do
>>> not have a floating point unit and the processor creates an illegal
>>> instruction (or something similar) exception.
>>> I solved this for me by patching out the call to the hardware
>>> coprocessor when softfpu is selected.
>> Which should be the correct approach for softfpu anyway. Afterall the
premise of softfpu is that
>> there is no hardware FPU to use and thus corresponding CPU instructions
are useless (or as it seems
>> in this case lead to nothing).
> This patch is correct only if the goal is do disable floating-point
completely. If the goal is to have floating-point calculations available
using emulation, then the entire procedures SysInitFPU and SysResetFPU
together with {$define FPC_SYSTEM_HAS_SYSRESETFPU} and {$define
FPC_SYSTEM_HAS_SYSINITFPU} must be disabled. Doing so will cause
softfpu-specific routines from generic.inc to be used.

Well, according to Reinier's test at least the route seems to be correct.
So we need to ensure that softfpu code for MIPS works correctly.

> I also wonder what is the correct way to generate code that calls softfpu:
> 2) -CfSOFT
> 3) -Ce
> ?

I only know -CfSOFT and that is what I use for m68k. -Ce likely only does
the same as -CfSOFT, but I don't know what -SfSOFTFPU is supposed to do.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140909/823ec945/attachment.html>

More information about the fpc-devel mailing list