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.
Hi,
yes, it is the memset in the standard C library. Guess there should be a no_allow_fpreg_for_nonfpdata version of the library.
(Btw. GCC does the same and tries to be "smart" )
THX for your time.
I guess the FP instructions is inside the C runtime library, not the compiler generated code. Is that correct?
I guess the option --no_allow_fpreg_for_nonfpdata only affects the compiler and there isn’t a switch to force C runtime code to use a different behavior.
Sorry that I don’t have a solution for you right now.
Regards,
Joseph
Hi Joseph,
that'll be the option I was looking for. Only it does not work. At least not with 5.04.
My compile options:
CPUFLAGS = --cpu cortex-a8 --apcs=/interwork --thumb
CFLAGS += $(CPUFLAGS) --debug --diag_suppress=550 --c99 --no_inline
CFLAGS += --diag_suppress=9933
CFLAGS += --no_allow_fpreg_for_nonfpdata
My code uses memset(...,0,...). _memset() in the Library checks if the destination is dividable by 4 and then jumps to memset_w which uses FPU registers.
For ARM compiler you could try --no_allow_fpreg_for_nonfpdata
--no_allow_fpreg_for_nonfpdata
See ARM Information Center
See
ARM Information Center
View all questions in Arm Development Studio forum