FP exceptions on Raspberry Pi

Dave Richards dave at synergy.org
Tue Dec 31 03:44:11 UTC 2019


It appears that the VFP unit on the Raspberry Pi does not generate FPU
exceptions.  Therefore, no SIGFPE is generated and cannot be handled by ECL.
This causes numerous 'make check' test failures.  I am working on a patch.
I am not very familiar with the ECL C environment so I am sure the patch
will need some help.  The approach is as follows:

1. There is no value in registering a SIGFPE handler.  For the ARM I will
just not register the handler at all.
2. I will created an arch/fpe_arm.c file.  I will re-define the macro to
read the FPSCR register and check for exception bits being set.  If any are
I will call a C function that will disambiguate which exception to map to a
condition and signal the condition.
3. I was planning on creating a static inline function for this purpose
right inside fpe_arm.c but if it should go somewhere else I'd be happy to
put it there.  The inline thing is just an excuse for sticking in the
fpe_arm.c file.  In reality it's probably better to make a C function call
to do the heavy lifting rather than making each FPE check pay for it.

	Dave










More information about the ecl-devel mailing list