stefan-bat-mv wrote on Thursday, March 16, 2017:
Hi,
are there any plans for FreeRTOS to support a NEON optimized version of memcpy? Or is this working already an I am just not using it correctly? When building with certain compiler flags for the above architecture ‘memcpy’ will use NEON internally. Now when FreeRTOS is running in interrupts as well as during task switches memcpy might be interrupted which results in the data stored in certain registers being lost/overwritten:
-mfpu=neon
memcpy() will use 4*32Byte NEON operations
VLD und VST
VLD1.8 {d0,d1,d2,d3}, [r1]!
VLD1.8 {d4,d5,d6,d7}, [r1]!
VST1.8 {d0,d1,d2,d3}, [r0@128]!
VLD1.8 {d0,d1,d2,d3}, [r1]!
VST1.8 {d4,d5,d6,d7}, [r0@128]!
VLD1.8 {d4,d5,d6,d7}, [r1]!
VST1.8 {d0,d1,d2,d3}, [r0@128]!
VST1.8 {d4,d5,d6,d7}, [r0@128]!
However none of the registers d0 - d7 seem to be stored in case of a task switch…
I am not entrily sure if I explained this correctly so please have mercy if I didn’t. I can provide additional information.
Regards,
Stefan