How can I tell the linker/compiler not to use memset/memcpy function which use FPU registers?
For example: SCIOPTA allows to limit the use of the FPU for certain tasks (to improve task-switching). Tasks without FPU may not use FPU registers. But the compiler/linker uses optimized versions of memset() which results in an exception.
I tried to compile C files with --fpu none, but this produces link-timer errors.
Mat,
the point is our RTOS allows users to disable FPU usage for certain processes (mostly for all but a few) to save context-switch time and stack space. The user is aware that they cannot use printf() or floating point mathematics in these tasks.
_But_ he is certainly not aware that the compiler uses FPU registers for a memcpy(). So the -no_allow.. option is surely something he needs to apply when compiling those processes. But since 99% of our customers have a single binary, they must link in the FPU version of the library since they use math functions in a few tasks.So I see the only way is to remove the optimized function from the library.
Cheers,
42Bastian
Perhaps a possible solution would be to write tiny wrappers for memcpy, memmove and memset.
Each wrapper checks whether or not the current task is allowed to use FPU registers.
-It could then call the right memcpy / memmove and memset, depending on the flag.