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

Michael Ring mail at michael-ring.org
Tue Sep 9 12:33:15 CEST 2014

Sergei, I have reworked the patch based on your comment:


Do you think this is solved better now?


Am 09.09.14 um 08:52 schrieb Sergei Gorelkin:
> 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.
> I also wonder what is the correct way to generate code that calls 
> softfpu:
> 2) -CfSOFT
> 3) -Ce
> ?
> Regards,
> Sergei
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

More information about the fpc-devel mailing list