The 3D Library example in the SDK contains the following SIMD headers:
- core_cm7.h
- core_cmFunc.h
- core_cmInstr.h
- core_cmSimd.h
They are not included or used at all in the example.
I tried using the headers from the example, but GCC assembler doesn't recognise the assembly instructions.
I do nothing special at build time, everything is stock from C_API/buildsupport.
// common.mk sets __FPU_USED but these headers expect __FPU_PRESENT
#define __FPU_PRESENT 1
#include "core_cm7.h"
int32_t accum = 0;
int32_t a = 10 << 16;
a |= 5;
int32_t b = 2 << 16;
b |= 7;
accum = __SMLAD(a, b, accum);
include/core_cmSimd.h:507: Error: no such instruction: `smlad %eax,%eax,%edx,%ecx'
From a quick glance at ARM's intrinsic documentation, Cortex M7 should support __SMLAD.
Before I investigate further into this, I'm asking here.
- Has anyone used SIMD on the Playdate?
- Are the headers in the 3D Library SDK appropriate for Cortex M7?
- Is there any extra compiler flags needed for the assembler to recognise these instructions?