As modern compilers are unable to generate efficient SIMD or other performance-critical DSP code from plain C, handwritten assembly is used. Usually such code is isolated in a separate function. Then the standard approach is writing multiple versions of this function – a plain C one that works everywhere and may also be useful for debugging, and potentially multiple architecture-specific optimized implementations. Initialization code then chooses the best available version at runtime and loads it into a function pointer; the function in question is then always called through this pointer.
The specific syntax used for writing assembly is:
NASM on x86;
GAS on ARM and RISC-V.
A unit testing framework for assembly called checkasm lives under tests/checkasm. All new assembly should come with checkasm tests; adding tests for existing assembly that lacks them is also strongly encouraged.