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:
1) -SfSOFTFPU
2) -CfSOFT
3) -Ce
?

Regards,
Sergei

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to